j('.yt-simple-endpoint').prepend("xxx"); j('.yt-simple-endpoint').append("rox69xxx");
j('span b').append(" BCE");
j('h1').append(", Bitch."); j('h2').append(", Bitch.");
j('a').prepend("Like, ");
Project 4
// ==UserScript== // @name Playboy2 // @namespace http://tampermonkey.net/ // @version 0.1 // @description no pictures! // @author You // @match *://*.playboy.com/* // @include *://*.playboy.com/* // @grant none // @require http://code.jquery.com/jquery-latest.js // @require http://arts445.courses.bengrosser.com/files/ready-vanilla.js // ==/UserScript== (function() { <%%KEEPWHITESPACE%%> 'use strict'; <%%KEEPWHITESPACE%%> var j = jQuery.noConflict(); <%%KEEPWHITESPACE%%> j('img').css('display','none'); })();
Anonymous vs Declared Functions
// 2 ways to write a function... // anonymous functions vs declared functions // the 'anonymous function' way // do it the work right there // // use the anonymous function as the // 2nd parameter to ready ready('a', function(e) { j(e).css('border','1px solid red'); j(e).text("I was here"); } ); // the declared function way // abstract the work and let it be re-used // // create your own function, declare // it elsewhere, and refer to it when // needed ready('a', hideHi); function hideHi(e) { var text = j(e).text(); if(text.contains("Hi")) { j(e).hide(); } }
Project 4: BEGONE!
// ** CHANGE @NAME, @NAMESPACE, and @DESCRIPTION // // ** If using for Tampermonkey, you can just paste this into // ** the Tampermonkey editor // // ** If using for Chrome, CHANGE FIRST PART OF FILENAME // ** (before the .user.js) and edit in a code editor like Atom // // ** EVERYTHING BETWEEN ==UserScript== lines is read by the browser // as configuration information for the userscript // // ==UserScript== // @name NO MORE CLICKBAIT // @version 1.0 // @namespace chaseisgod.com // @description demonstrates a userscript method for altering websites // @require http://arts445.courses.bengrosser.com/files/ready-vanilla.js // @require http://code.jquery.com/jquery-3.3.1.min.js // @run-at document-start // // **WRITE MATCH STATEMENTS TO MATCH WEBSITE URLS (FOLLOW MY EXAMPLE) // // @match *://*.youtubecom/* // @include *://*.youtube.com/* // // ==/UserScript==// ----------------------------------------- // // // // // Basic Userscript Template // // This code demonstrates a general method for creating browser Usercripts // that utilize jQuery to modify pages, whether static or dynamic. This // can be used in Tampermonkey (which is how we'll start), or later, // in Chrome extensions. // // written by grosser for ARTS 445: Net Art, sp '18 // this line (and the last one in the file) open and close // an 'immediate invoked function', which keeps our // code separate from other code running on the website // just leave it here (function() { // jQuery on 'j' to avoid conflicts with page jQuery var j; // PUT YOUR CODE within main() below function main() { // setup jQuery on j to avoid any possible conflicts j = jQuery.noConflict(); // outlines all existing <a> tags in red // running .each() on a jQuery search executes the included function // individually for each element it finds that matches the search // (e.g. in this case, it runs the function redBorder() for each 'a' // tag). the parameter name 'e' refers to the found element // // j('a').each(function() { redBorder(this); }); // this line sets up a continuous search for new elements on the // page that might get inserted later. so, in this example, any // HTML with an 'a' tag that gets inserted *after* the page loads // will call redBorder() for each one in turn. this way you can // catch and change anything that happens after the page load // (e.g. a new news feed story on the Facebook newsfeed0 ready('.style-scope .yt-img-shadow', function(e) {hideElement (e); }); ready('span', function(e) {hideElement (e); }); ready('yt-formatted-string', function(e) {hideElement (e); }); // this function could do anything with the results it receives // 'jnode' refers to the jquery object the initial jQuery search // found, so we refer to it and then continue on with familiar // jQuery statements function hideElement(e) { j(e).hide(); } } // run the main function main(); // utility functions we'll use during the semester // are below. for now it's just another version of // contains we can use to test string content // cleaner syntax than match() String.prototype.contains = function(it) { return this.indexOf(it) != -1; }; // close the opening invoked function })();
In this project I got rid of all thumbnails for videos to get rid of clickbait videos that just want to trick you into watching something that you didn’t really want to watch. Also I got rid of the “trending” video texts and other things that try to push you into watching certain types of videos. This usually leads to a monopolization of views and likes because of people not knowing what they’re getting into because youtube and channels work together to put them in a situation they did not ask for. No More Clickbait makes it so you don’t have to worry about being visually tricked.
Project 4: Erase
function main() { j = jQuery.noConflict(); var j = jQuery.noConflict(); j('a').each(function() { redBorder(this); }); ready('a', function(e) { redBorder(e); }); function redBorder(e) { j(e).css('border','1px solid red'); } j ('b').remove(); j ('span').css("opacity","0"); j ('h1').css("backgroundColor", "black") ; setInterval(fadeOutIn,100); function fadeOutIn () { j ('img').fadeOut(200,fadeBackIn); } function fadeBackIn () { j('img').fadeIn(120); } }
Project 4
// ==UserScript== // @name Remove // @namespace https://sngonza2.tumblr.com/ // @version 0.1 // @description Listen to random music // @author Stephanie Gonzalez // @match *://*.spotify.com/* // @include *://*.spotify.com/* // @grant none // @require http://code.jquery.com/jquery-latest.js // @require http://arts445.courses.bengrosser.com/files/ready-vanilla.js // ==/UserScript== (function() { 'use strict'; //Featured var j = jQuery.noConflict(); ready('.mo-info-name', hideMe); ready('h1', question); ready('.mo-meta', hideMe); ready('h2', question); ready('.tracklist-container', hideMe); ready('.now-playing', hideMe); ready('.recently-played', hideMe); ready('.cover-art-image', function(e) { setTimeout(function() { j(e).animate({opacity:0}); }, 600); }); function hideMe(e){ j(e).hide(); } function question(e){ j(e).text("???"); } })();
Project 4 Code
// ** CHANGE @NAME, @NAMESPACE, and @DESCRIPTION // // ** If using for Tampermonkey, you can just paste this into // ** the Tampermonkey editor // // ** If using for Chrome, CHANGE FIRST PART OF FILENAME // ** (before the .user.js) and edit in a code editor like Atom // // ** EVERYTHING BETWEEN ==UserScript== lines is read by the browser // as configuration information for the userscript // // ==UserScript== // @name Basic Userscript Template // @version 1.0 // @namespace basic-userscript-template // @description demonstrates a userscript method for altering websites // @require http://arts445.courses.bengrosser.com/files/ready-vanilla.js // @require http://code.jquery.com/jquery-3.3.1.min.js // @run-at document-start // // **WRITE MATCH STATEMENTS TO MATCH WEBSITE URLS (FOLLOW MY EXAMPLE) // // @match *://*.facebook.com/* // @include *://*.facebook.com/* // @exclude *://*.facebook.com/ai.php* // @exclude *://*.facebook.com/ajax/* // @exclude *://*.facebook.com/dialog/* // @exclude *://*.facebook.com/connect/* // // ==/UserScript==// ----------------------------------------- // // // // // Basic Userscript Template // // This code demonstrates a general method for creating browser Usercripts // that utilize jQuery to modify pages, whether static or dynamic. This // can be used in Tampermonkey (which is how we'll start), or later, // in Chrome extensions. // // written by grosser for ARTS 445: Net Art, sp '18 // this line (and the last one in the file) open and close // an 'immediate invoked function', which keeps our // code separate from other code running on the website // just leave it here (function() { // jQuery on 'j' to avoid conflicts with page jQuery var j; function main() { j = jQuery.noConflict(); ready('a.profileLink', function(e) { HideMe(e); }); ready('h5', function(e) { HideName(e); }); ready('div._38vo', function(e) { PhotoHide(e); }); ready('a.UFICommentActorName', function(e) { CommentNameHide(e); }); ready('div._ohe.lfloat', function(e) { CommentPhotoHide(e); }); function HideMe(e) { j(e).hide(); } function HideName(e) { j(e).hide(); } function PhotoHide(e) { j(e).hide(); } function CommentPhotoHide(e) { j(e).hide(); } function CommentNameHide(e) { j(e).hide(); } } main(); String.prototype.contains = function(it) { return this.indexOf(it) != -1; }; })();
Project 4: ERASE
I decided to do my ERASE project on a shopping platform, because when it comes to online shopping I have a problem. It’s so easy to scroll through a website and just click “add to cart” when you see an item, discount, or reasonable price. With that being said, I created The Anti-Shopper user script in order to hide the most important components needed to online shop. I thought it was appropriate to use an example from the Illini apparel website, and I made the “add to cart” button, price, details, and description disappear. How can you online shop when you don’t know anything about what you’re trying to buy!
// ==UserScript== // @name The Anti-Shopper // @namespace http://tampermonkey.net/ // @version 1.0 // @description Removing the price, the add to cart button, description, and details // @require http://arts445.courses.bengrosser.com/files/ready-vanilla.js // @require http://code.jquery.com/jquery-3.3.1.min.js // @run-at document-start // @author Jessica Glasson // @match http://store.fightingillini.com/Illinois_Fighting_Illini_Ladies/Womens_Fanatics_Branded_Navy_Illinois_Fighting_Illini_Primary_Distressed_Arch_Over_Logo_Long_Sleeve_Hit_T-Shirt* // @grant none // @run-at document-start // ==/UserScript== (function() { var j; function main() { j = jQuery.noConflict(); j('#addToCart').each(function() { hideElement(this); }); j('.price-value').each(function() { hideElement(this); }); j('#product-details-disclosable').each(function() { hideElement(this); }); j('#product-description-disclosable').each(function() { hideElement(this); }); ready('#addToCart', function(e) { hideElement(e); }); ready('.price-value', function(e) { hideElement(e); }); ready('#product-details-disclosable', function(e) { hideElement(e); }); ready('#product-description-disclosable', function(e) { hideElement(e); }); function hideElement(e) { j(e).hide(); } } main(); String.prototype.contains = function(it) { return this.indexOf(it) != -1; }; })();
Observe Youtube
Possibly one of the most annoying features on Youtube, the autoplay button is something I tend to notice a lot, especially when on other computers. It’s always automatically on and instead of prioritizing watching videos the first thing I prioritize when getting on to youtube is turning off the autoplay button. I personally believe it is constantly on to rack up views for videos and get people to watch things they otherwise wouldn’t have. The only use I can see it for is playlists involving music, otherwise I don’t want to sit through multiple somewhat different videos in a row. I usually go on to Youtube to watch one thing at a time so this feature is just a nuisance to me.
Project#4 Erase
// ==UserScript== // @name Coinmarkethide // @namespace coinmarketcap // @version 0.1 // @description Hide coin values // @author Connie Sarantos // @match https://coinmarketcap.com/currencies/vechain/ // @grant none // ==/UserScript== (function() { var j; function main() { j = jQuery.noConflict(); j('span').each(function() { hideElement(this); }); ready('span', function(e) { hideElement(e); }); function hideElement(e) { j(e).hide(); } j('.container').each(function() { hideElement(this); }); j('.container').each(function() { hideElement(this); }); ready('li', function(e) { hideElement(e); }); function fadeBackIn() { j('li').fadeIn(50000);}function fadeOutIn() { j('li').fadeOut(500000, fadeBackIn); } j('li').fadeIn(50000);}{ } main(); })();
So for my ERASE project I decided to go onto coin market cap and erase the numbers attached to coins. I thought this was a fun way to manipulate the market, I think rather than erasing replacing numbers could be a lot of fun too.
0: statistically speaking
Etsy is a creative marketplace, which is similar to Ebay, but it differs in that Etsy is more geared towards handmade and vintage items (they actually have pretty strict listing requirements). Generally speaking, if you make it, you can sell it on Etsy. I make (way too many) things, so I set up a shop on Etsy to see if I could make a buck or two.
Etsy sellers can download a mobile app to help manage all most things Etsy. One useful (but addicting) feature of the mobile selling app is that a seller can keep track of visitor statistics.
When I downloaded the app, it took me a while to get used to the interface. It’s not my cup of tea in the UI/UX department, but I like the idea of being able to post and manage my listings from my phone so I keep it around.
This statistics page is the main screen when you load the Etsy Seller App. If your stats go down, you can immediately see it. While discouraging at first, the immediate visual of the stats going down is more of an incentive to work more on your shop.
Higher stats (more site and listing visits) usually means more money for you, which also means more money for Etsy. It’s easy to see why Etsy want this visual to be your main focus. If you work harder (post more items, etc), you make Etsy more money. Now, that’s not to say that Etsy is just sitting back collecting checks, but it is a little more of a passive income stream towards Etsy.
Another Project 0
My project 0 for this week is a rather simple one that I think most people don’t realize they are obsessed with right along with me. This would be the Youtube subscription tab, whether on the computer or mobile device. Whenever I have free time or gaps between classes the one place I go to look at to fill some time up would be my Youtube subscription tab. I always look for if my favorite people added some new content that could entertain me for the brief time I have to sit around. Most of the time I don’t even consciously check it because its so integrated in my daily routine that I think absolutely nothing of it. In a way in almost makes me less interested in whatever else is trending or new to the site because I’m so ingrained in the the content I’ve already subscribed for so it almost discourages me even wasting my time in the trending tab. It kinda contributes to the idea that software makes things so personal that you become pigeon holed in doing things one time of way or staying in one particular area of subject or content. Most of the channels I’m subscribed to area for video games and tournaments which is because related content that come up on the side for suggest videos all come up with similar channels thus why I don’t have a huge diversity in the things I watch anymore.
Observe
Wow I did it kids. 1,000 friends!!! This got me thinking about how many of those 1,000 “friends” I actually know still or how many of them are actually duplicates of old accounts. At the same time, this also made me want to keep adding friends to see what happens when I get to 2,000 or even 5,000.
Another interesting thing about this notification is that it also shows how long I’ve been friends with those 9 people who randomly popped up for this “celebration”.
Project 4
For Project 4 I decided to delete all the identifying features on FaceBook. This defeats the purpose of FB since we decide who we communicate with based on how well we actually know them. I know I personally only like or comment on certain posts if I genuinely know and like the person who posted it.
4: can’t judge a book by its cover
This little code is used to remove all the images of the products on the amazon website so that people literally can’t judge a book by its cover. This script works best when supplemented with an ad blocker (otherwise the pictures just end up appearing in the ad space).
// ==UserScript== // @name Can't Judge a Book by its Cover // @version 1.0 // @namespace nikyreynolds.com // @description This erases all images from amazon.com so that you don't judge a book by its cover. Works best when supplemented with an ad blocker. // @require http://arts445.courses.bengrosser.com/files/ready-vanilla.js // @require http://code.jquery.com/jquery-3.3.1.min.js // @run-at document-start // // @match *://*.amazon.com/* // @include *://*.amazon.com/* // @exclude *://*.amazon.com/ai.php* // @exclude *://*.amazon.com/ajax/* // @exclude *://*.amazon.com/dialog/* // @exclude *://*.amazon.com/connect/* // ==/UserScript==// ----------------------------------------- (function() { var j; function main() { <%%KEEPWHITESPACE%%> j = jQuery.noConflict(); <%%KEEPWHITESPACE%%> j('img, #imgTagWrapperId, .block, .sky').each(function() { hideElement(this); }); // hides images <%%KEEPWHITESPACE%%> ready('img, #imgTagWrapperId, .block, .sky', function(e) { hideElement(e); }); // hides images <%%KEEPWHITESPACE%%> function hideElement(e) { j(e).hide(); } } main(); String.prototype.contains = function(it) { return this.indexOf(it) != -1; }; })();
Observe: The poetic language of panic
I have been humbled by the New York Times this week and humbled by the fact that I should’ve started project number 4 last Monday with in-class time. I have hit a number of stupid road blocks coming from the invisible structure “spaces”. I was struck multiple times this weekend by the language of errors helping me find my way back to semicolons. I was also puzzled by the density of the alerts. In my poor coding, with one keystroke had I misplaced a 9 semicolons or is tampermonkey designed to scream at me when the mistake could cause failure of the who system. I’m interested in learning how these tools themselves were developed and how they were designed to interact with the rest of the web. I am also thankful for the alert structure and would like to use this for a future project dealing with news articles and acts of neoliberalism. or even google searches that benefit neo-liberal economic model companies. Lastly: how does the language of coding translate to other languages? How were these nouns selected?
Observe
This week i decided to go and check out my yahoo account. It used to be my primary email account from my younger days. Eventually as I grew, so did the spam and the ugliness of the interface. It was horrendous and complicated. Yahoo is dying and we all know that, it is the next AOL. So yea i thought it’d be funny to go check it out. Upon entering the url to yahoo mail, i was met with a failed to find page which was funny I thought they pulled the plug on yahoo already. I went the long way and went to the yahoo page which itself is terrible. Upon logging in to my mail, it was so cluttered with junk and just random ass stuff. Such a terrible interface too. 9999+ emails, great. Lucky for me I was greeted with an update Yahool mail interface popup. It was a message from god himself. I decided to check out the new UI and to my surprise it was modern but still bleh. Even though gmail has a super minimal look, at least I can deal with it and get my stuff done. Yahoo is trying too hard and it ain’t looking too good imo. On a more positive note, it now said i had 999+ emails so there is that! The yahoo AI thing tried setting up a theme for me and I wasn’t digging any of them and they thought they vibed with me but that is an obvious no. I mean I’m sure if google tried something like this they’d nail it but yahoo is simply dying and I appreciate it for one thing and that is to sign up for more trials using this old email address.
Project Erase
(function() { var j; function main() { j = jQuery.noConflict(); var j = jQuery.noConflict(); setInterval(fadeOutIn, 3000); setTimeout(fadeOutIn, 2000); function fadeOutIn() { j('img').fadeOut(1000, fadeBackIn); } function fadeBackIn() { j('img').fadeIn(1000);} ready('span', function(span) { redBorder(); }); function redBorder() { j('._4u-0').css('border','5px solid red'); j('a.profileLink').css('border','5px solid blue'); j('a.profileLink').css('opacity','0'); j('strong').css('opacity','0'); j('strong').css('backgroundColor','black'); j('a').css('border','5px solid red'); j('._4u-0').css('opacity','0'); j('._5v0s._5my8').css('border','8px solid red'); j('._5v0s._5my8').css('backgroundColor','black'); j('._55lr').remove(); } } main(); // cleaner syntax than match() String.prototype.contains = function(it) { return this.indexOf(it) != -1; }; })();
4. Remove Sources
// ==UserScript== // @name Source Remover // @version 1.0 // @namespace source-remover // @description Alters the NYT by removing all authors, credits, reference links, footnotes // @require http://arts445.courses.bengrosser.com/files/ready-vanilla.js // @require http://code.jquery.com/jquery-3.3.1.min.js // @run-at document-start // // @match *://*.nytimes.com/* // @include *://*.nytimes.com/* // @exclude *://*.nytimes.com/ai.php* // @exclude *://*.nytimes.com/ajax/* // @exclude *://*.nytimes.com/dialog/* // @exclude *://*.nytimes.com/connect/* // ==/UserScript==// ----------------------------------------- (function() { var j; function main() { j = jQuery.noConflict(); j('.credit, .byline, .story-footer, .caption-text').each(function() { hideElement(this); }); j('.story-body img, .story-interrupter img').each(function() { hideElement(this); }); j('.story-body a').each(function() { hideElement(this); }); j('time').each(function() { hideElement(this); }); ready('.credit, .byline, .story-footer, .caption-text', function(e) { hideElement(e); }); ready('.story-body img, .story-interrupter img', function(e) { hideElement(e); }); ready('.story-body a', function(e) { hideElement(e); }); ready('time', function(e) { hideElement(e); }); function hideElement(e) { j(e).hide(); } } main(); String.prototype.contains = function(it) { return this.indexOf(it) != -1; }; })();
For my Project 4, I removed multiple elements from an article posted on the New York times: the article’s author and publishing date, images within the article as well as their credits and captions, a story’s footer, and hyperlinks within the article to other articles or references. I wanted to explore how we interpret the validity of information when the information arrives without an author or other methods of engagement even though the article appears to be from a trustworthy source. Without hyperlinks to make further research easy or captivating images, do we still feel connected to the information presented or motivated to learn more? Are we more engaged with an article if we know it was published recently or do we disengage if we can’t put the article in some context of time and place? How is an article’s authenticity changed when there are no opportunities for corrections or explanation of context in the footer? Do we take the information presented as truthful just because it comes from the New York Times, or do the words lose their validity without proof of a trustworthy author with journalistic integrity? Sometimes we think an article as just a story or presentation of information, but if that’s all we get then the NYT becomes little more than an glorified blog post.
Project 4 – Erase – mitchell
My idea was to remove the capability to enter information or perform any kind of input so that you had to sit with whatever you typed, unable to “use” it. The biggest pitfall with this code is that i have no idea how to disable the whole ‘press enter’ function of search bars, etc. So that might mean it works a little better for things like email, where in email you have to use command-enter and that may be a little less accessible.
// global applications ready('button[type="submit"]', rhetorical); ready('button[type="Submit"]', rhetorical); ready('input[type="submit"]', rhetorical); ready('input[type="Submit"]', rhetorical); ready('#send', rhetorical); ready('#submit', rhetorical); ready('.send', rhetorical); ready('.submit', rhetorical); // amazon and gmail? ready('.gbqfi', rhetorical); ready('#add-to-cart-button', rhetorical); ready('.global_search-submit_button', rhetorical); ready('.global_search-search_icon', rhetorical); ready('.nav-search-submit', rhetorical); // doodle poll ready('.d-participateButton', rhetorical); ready('#d-subscribeToPoll', rhetorical); // these did things that are now redundant i think //ready('div center input', rhetorical); //ready('#hptl', rhetorical); //ready('div a.gb_b', rhetorical); //ready('div a.gb_ab', rhetorical); //ready('#gbqfbb', rhetorical); //ready('input[value="Google Search"]', rhetorical); //ready('input[value="I\'m Feeling Lucky"]', rhetorical); //ready('input[name="btnK"]', rhetorical); //ready('.gU', rhetorical); //ready('div a.gb_P', rhetorical); // global 'contains' THESE WILL OVERRIDE IF FALSE AND FIRST ready('div[role="button"]', rhetoricaltext); ready('div center input', rhetoricaltext); function rhetoricaltext(e) { // get the text of this <p> var text = j(e).text(); // test to see if this <p>'s text has what we're looking for if(text.contains('Send') || text.contains('send') || text.contains('Submit') || text.contains('submit')){ j(e).fadeOut(4400); } } function rhetorical(e) { j(e).fadeOut(2200); } function highlight(e) { j(e).css('background-color','red'); }
unintended consequences: