Jump to content

MediaWiki:Gadget-censor.js: Difference between revisions

From Horse Bar Lobster
No edit summary
No edit summary
 
Line 1: Line 1:
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 () {
$(function () {


$("body").children().each(function () {
$("body").children().each(function () {
     $(this).html( $(this).html().replace("job","j*b") );
     findAndReplace(this)
    $(this).html( $(this).html().replace("Job","J*b") );
 
    $(this).html( $(this).html().replace("work","w*rk") );
    $(this).html( $(this).html().replace("Work","W*rk") );


});
});

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)

});



});