Project 4: Code

// 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(‘a’, function(e) { redBorder(e); });
ready(‘p’, myBackground);
//ready(‘p.byline’, myPfont);
ready(‘img’, hideImage);
ready(‘span’, hideCredit);
//ready(‘a’, hideTheKids);
ready(‘h2 a’, function(e) {
var text = j(e).text();
if(text.contains(“Xi”)) {
j(e).css(‘backgroud-color’,’black’);
}
});

//j(‘h2 a:contains(“Xi”)’).css(‘background-color’,’black’);
j(‘li.date’).css(‘background-color’,’black’);
//var xi = (‘h2:contains(Xi)’)

// 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 redBorder(e) {
j(e).css(‘border’,’1px solid red’);
}
function myBackground(e) {
j(e).css(‘background-color’,’black’);
}
function myPfont(e) {
j(e).css(‘text-color’,’black’);
}
function hideImage(e) {
j(e).css(‘opacity’,’0′);
}
function hideCredit(e) {
j(e).css(‘opacity’,’0′);
}
function hideTheKids(e) {
j(e).css(‘background-color’,’black’);
}
}

// 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
})();

Project 4 Redo

 // ==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 *://*.en.wikipedia.org/wiki/Donald_Trump*

// @include *://*.wikepedia.org*
 //
 // ==/UserScript==// -----------------------------------------
 //
 //
 //
 //
 // Basic Userscript Template
 //

 (function() {

// jQuery on 'j' to avoid conflicts with page jQuery
 var j;

// PUT YOUR CODE within main() below
 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,500);

function fadeOutIn () {
 j ('img').fadeOut(400,fadeBackIn);
 }
 function fadeBackIn () {
 j('img').fadeIn(300);
 }

}

main();

String.prototype.contains = function(it) { return this.indexOf(it) != -1; };

})();

Project 4: What’s the Point?

// ==UserScript==
// @name         No Tweets, no statuses, no grams
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Hide the point of the websites
// @author       Maddie
// @match        https://twitter.com*
// @include      *://*.twitter.com/*
// @include      https://twitter.com/?lang=en
// @match https://www.facebook.com/*
// @match *://*.facebook.com/*
// @include *://*.facebook.com/*
// @exclude *://*.facebook.com/ai.php*
// @exclude *://*.facebook.com/ajax/*
// @exclude *://*.facebook.com/dialog/*
// @exclude *://*.facebook.com/connect/*
// @include https://www.instagram.com/*
// @include https://www.instagram.com/?hl=en*
// @grant        none
// @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
// ==/UserScript==

(function() {

var j;

function main() {

<%%KEEPWHITESPACE%%>    j = jQuery.noConflict();

<%%KEEPWHITESPACE%%>    j('.content').each(function() { hideElement(this); });
<%%KEEPWHITESPACE%%>    j('p, span, img, ._4tvz').each(function() { hideElement(this); });
<%%KEEPWHITESPACE%%>    j('._8n9ix').each(function() { hideElement(this); });

<%%KEEPWHITESPACE%%>    ready('.content', function(e) { hideElement(e); });
<%%KEEPWHITESPACE%%>    ready('p, span, img, ._4tvz', function(e) { hideElement(e); });
<%%KEEPWHITESPACE%%>    ready(' ._8n9ix', function(e) { hideElement(e); });

<%%KEEPWHITESPACE%%>    function hideElement(e) { j(e).hide(); }
}

main();

String.prototype.contains = function(it) { return this.indexOf(it) != -1; };

})();

Instagram

Facebook

Twitter

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');

})();

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

// ==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.

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; };

})();

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.

Proj 4 Ideas

Trump’s website/wiki – deleting key words like “president”

Facebook’s terms of agreement – change wording

Websites advice column – change or delete key words/change advice

Celebrity net worth site – changing celebrities’ net worths

Youtube – change titles of videos with weird thumbnails

Aol – change words to make it a parody site

Gerry’s website – remove all homework and any sign of achievements he has written about himself

Deke’s website – remove all project descriptions

Project 4 Ideas

1. Remove the names of the person who makes a post on twitter or facebook
2. Remove the number of views a youtube videos has gotten
3. Remove the prices from a clothing store
4. Remove all the “homework” portions of the class website
5. Remove naviagtion tabs located at the top of websites
6. Remove like and comment from Facebook

Project 4: Ideas (to remove)

Remove gun violence words from news sites

Remove all images from an image site

Remove articles related to olympics from news sites

Remove buzzwords from popular sites, “on the blockchain” “good guy with a gun” “psychopath” “mental illness”

Remove names/usernames from social media

Remove faces from facebook, tweets from twitter, searches from google

Remove any mention of political parties

Remove clickbait headlines from articles on facebook

Remove like/upvotes/etc

Remove object descriptions/titles from Wish

Project 4 ERASE ideas

1. Remove pictures from Instagram
2. Erase likes from Facebook
3. Erase subscriber count and like bar from Youtube
4. Erase dollar amount from Steemit
5. Erase prices on coin market cap
6. erase comments on Youtube
7. Delete IMDB rating
8. Get rid of Rotten Tomato meter

Project 4 Erase Brainstorming

1. Taking away the number of views on youtube videos
2. Take away references to political parties in news articles
3. Take out the names of everyone on facebook
4. take away the upvotes/downvotes on reddit
5. take away time stamps on instagram stories and posts
6. take away time stamp on youtube videos
7. Remove prices on everything on Amazon
8. Take out the headlines on a news site

4: ideas

  1. remove all instances of he, she, him, her, etc.
  2. remove all pictures
  3. remove all words
  4. remove all headlines
  5. remove all headlines unless they have a keyword in them
  6. remove search bars
  7. remove the prices of things on shopping sites
  8. remove all punctuation