└── Josh-Hack.js /Josh-Hack.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name Facebook Spam 3 | // @namespace http://pegabyte.com/ 4 | // @version 0.1 5 | // @description try to take over the world! 6 | // @author You 7 | // @include https://www.facebook.com/* 8 | // @run-at document-start 9 | // @grant none 10 | // ==/UserScript== 11 | 12 | (function() { 13 | "use strict"; 14 | document.addEventListener('DOMContentLoaded', () => setTimeout(() => { 15 | var followBtns; 16 | var addEveryMs = 400; 17 | function getNextPage() { 18 | followBtns = [].slice.call(document.querySelectorAll('.UFILikeLink'), 1); 19 | followBtns.map((button, index) => setTimeout(() => button.click(), index * 1500) + 200); 20 | setTimeout(() => { 21 | document.body.scrollTop = document.body.scrollHeight; 22 | getNextPage(); 23 | }, followBtns.length * 1500 + 200); 24 | } 25 | getNextPage(); 26 | }, 2500), false); 27 | })(); --------------------------------------------------------------------------------