daddifier

replaces "the state" with "daddy"

2019-12-05 일자. 최신 버전을 확인하세요.

질문, 리뷰하거나, 이 스크립트를 신고하세요.
// ==UserScript==
// @name daddifier
// @namespace Violentmonkey Scripts
// @author ghostplantss
// @grant none
// @match *://www.tumblr.com/dashboard
// @description replaces "the state" with "daddy"
// @version 1.0
// ==/UserScript==
// 
// 

var state = ["the state", "the nation","France","society","the patrie","the republic","the people","Patria"];
(
  function scroll (f) {
  var count = 0;
  window.addEventListener("scroll", ( //every time you scroll
  function fun() //it runs this function!
  {
    count++;
    $("div.post").each(function() //for each post
    { 
      if(!$(this).hasClass('checked'))//if it has not already checked the post
       {
         this.className += " checked";
          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);