您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
// ==UserScript== // @name Likes Resurrector // @namespace http://www.facebook.com/Tophness // @version 0.1 // @description try to take over the world! // @author Tophness // @match http://www.facebook.com/* // @match https://www.facebook.com/* // @exclude https://www.facebook.com/permalink.php* // @grant none // ==/UserScript== function processPost() { let posts = document.getElementsByClassName('userContentWrapper'); for (let i = posts.length - 1; i >= 0; i--) { if(typeof(posts[i].childNodes[1]) == 'undefined'){ continue; } try{ let likeText = posts[i].childNodes[1].childNodes[0].childNodes[4].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[1]; if(likeText.innerText.indexOf('and others') != -1){ likeText.childNodes[1].childNodes[0].innerHTML = likeText.childNodes[1].childNodes[0].innerHTML.replace("and others","") + "and " + likeText.childNodes[0].childNodes[0].innerHTML + " others"; } } catch(e){ } } } window.addEventListener("DOMNodeInserted", function() { processPost(); }, false);