您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
replaces "the state" with "daddy"
// ==UserScript== // @name daddifier // @namespace Violentmonkey Scripts // @author ghostplantss // @grant none // @match *://www.tumblr.com/dashboard // @description replaces "the state" with "daddy" // @version 1.1 // @require https://code.jquery.com/jquery-3.3.1.min.js // ==/UserScript== // // var state = ["the state", "the nation","France","society","the patrie","the republic","the people","Patria"]; ( function scroll (f) { window.addEventListener("scroll", ( //every time you scroll function fun() //it runs this function! { $("div.post").each(function() //for each post { if(!$(this).hasClass('daddifier'))//if it has not already checked the post { this.className += " daddifier"; var divs = this.getElementsByTagName('p'); for(var i = 0; i< divs.length;i++)//it iterates through all paragraphs { for(var j = 0; j< state.length;j++)//and iterates through array of synonyms of state { divs[i].innerHTML= divs[i].innerHTML.replace(state[j], "Daddy");//it replaces all synonyms of state w/ "Daddy" } } } }); }), false);//you're welcome } )(window.jQuery);