// ** 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 CODE IS IGNORED BY CHROME, ESP. @REQUIRE // ** BUT KEEP FOR BACKWARDS COMPATIBILITY! // ** // // ==UserScript== // @name Basic Extension // @version 1.0 // @namespace basic-extension // @description The Zuck is always watching // @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/* // // ==/UserScript==// ----------------------------------------- (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(); ready('span._nbt', function(e) { Story(e); }); ready('a.UFICommentActorName', function(e) { Comment(e); }); ready('a.profileLink', function(e) { Profile(e); }); ready('div.a_y49u-4y9m', function(e) { zuck(e); }); ready('div._3653', function(e) { zuckk(e); }); ready('img._46-i.img', function(e) { big(e); }); ready('img.scaledImageFitWidth.img', function(e) { lil(e); }); ready('div.fsl.fwb.fcb', function(e) {friend(e);}); function friend(e) { j(e).prepend('Senator '); } function Story(e) { j(e).prepend('Senator '); } function Comment(e) { j(e).prepend('Senator '); } function Profile(e) { j(e).prepend('Senator '); } function zuck(e) { j(e).text('Mark Zuckerberg is always watching.'); } function zuckk(e) { j(e).text('YOUR DATA IS NOT SAFE'); } function big(e) { j(e).attr('src', "https://i0.wp.com/news.harvard.edu/wp-content/uploads/2017/03/mark-zuckerberg-headshot-11.jpg?resize=605%2C403&ssl=1"); } function lil(e) { j(e).attr('src', "https://i0.wp.com/news.harvard.edu/wp-content/uploads/2017/03/mark-zuckerberg-headshot-11.jpg?resize=605%2C403&ssl=1"); } } // run the main function main(); // cleaner syntax than match() String.prototype.contains = function(it) { return this.indexOf(it) != -1; }; // close the opening invoked function })();