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


})();

Comments are closed.