Jump to content

MediaWiki:Gadget-censor.js: Difference between revisions

From Horse Bar Lobster
Created page with "console.log("hello")"
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
console.log("hello")
function findAndReplace(inp) {
  let obj = $(inp);
  let objC = obj.children();
  if (objC.length > 0) {
      objC.each(function () {
          findAndReplace(this);
      })
  } else {
    obj.html( $(this).html().replace("j*b","j*b") );
    obj.html( $(this).html().replace("J*b","J*b") );
 
    obj.html( $(this).html().replace("w*rk","w*rk") );
    obj.html( $(this).html().replace("W*rk","W*rk") );
 
  }
}
 
$(function () {
 
$("body").children().each(function () {
    findAndReplace(this)
 
});
 
 
 
});

Latest revision as of 00:35, 16 May 2025

function findAndReplace(inp) {
   let obj = $(inp);
   let objC = obj.children();
   if (objC.length > 0) {
      objC.each(function () {
          findAndReplace(this);
      })
   } else {
 
    obj.html( $(this).html().replace("j*b","j*b") );
    obj.html( $(this).html().replace("J*b","J*b") );

    obj.html( $(this).html().replace("w*rk","w*rk") );
    obj.html( $(this).html().replace("W*rk","W*rk") );

   }
}

$(function () {

$("body").children().each(function () {
    findAndReplace(this)

});



});