Like Bomber

Like all posts including comments on the selected thread with only one click. By SyfuxX edited by lanceq

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        Like Bomber
// @autor       Lanceq
// @namespace   http://lanceq.pl
// @description Like all posts including comments on the selected thread with only one click. By SyfuxX edited by lanceq
// @include     http://facebook.com
// @include     http://facebook.com/*
// @include     http://www.facebook.com
// @include     http://www.facebook.com/*
// @include     https://facebook.com/*
// @include     https://facebook.com
// @include     https://www.facebook.com/*
// @include     https://www.facebook.com
// @version     1.0
// @grant       none
// ==/UserScript==


var btnFbLike = document.createElement( 'input' );
with( btnFbLike ) {
  setAttribute( 'type', 'button' );
  setAttribute( 'value', 'Bombarduj' );
  setAttribute( 'onclick', 'javascript: var inputs = document.getElementsByClassName("_48-k UFILikeLink"); for(var i=0; i<inputs.length;i++) { inputs[i].click(); }' );
  setAttribute( 'onclick', 'javascript: var inputs = document.getElementsByClassName("UFILikeLink"); for(var i=0; i<inputs.length;i++) { inputs[i].click(); }' );
  setAttribute( 'style', 'position: fixed; top: 55px; left: 10px; font-weight: bold; font-size: 12px; font-family: calibri; color: white; black; border: 1px solid; border-radius: 25px; background-color: rgb(70, 98, 158);  padding: 2px 5px 2px 5px;' )
}

document.getElementsByTagName( 'body' )[ 0 ].appendChild( btnFbLike );