Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Auto-Like
- // @namespace duclvz
- // @version 0.1
- // @description try to take over the world!
- // @author duclvz
- // @match https://www.facebook.com/profile.php?id=*
- // @match https://www.facebook.com/*
- // @match https://m.facebook.com/*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- window.onload=function(){
- if (document.querySelector('button.likeButton')) {
- document.querySelector('button.likeButton').click();
- }
- if (Array.from(document.querySelectorAll('a.touchable')).find(function(x){return x.innerHTML === 'Like'})) {
- Array.from(document.querySelectorAll('a.touchable')).find(function(x){return x.innerHTML === 'Like'}).click();
- }
- if (document.querySelector('td a span')) {
- document.querySelector('td a span').parentElement.click();
- }
- if (Array.from(document.querySelectorAll('a')).find(function(x){return x.innerHTML === 'Like'})) {
- Array.from(document.querySelectorAll('a')).find(function(x){return x.innerHTML === 'Like'}).click();
- }
- if (Array.from(document.querySelectorAll('a')).find(function(x){return x.innerHTML === '<b>Like</b>'})) {
- window.close();
- }
- setTimeout(function(){window.close();},3000)
- };
- })();
Advertisement
Add Comment
Please, Sign In to add comment