Disable Kong's Stupid Chat Filter

Disable stupid chat filters

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name        Disable Kong's Stupid Chat Filter
// @namespace   kong_user
// @description Disable stupid chat filters
// @include     http://www.kongregate.com/games/*
// @version     1
// @grant       none
// ==/UserScript==

(function () {
  var scriptID = 'GM::Disable Stupid Chat Filter: ';
  
  if (window.parent != window) {
    //console.log (scriptID + "Aborting - in iframe or other subpage.");
    //console.warn (scriptID + "Aborting - in iframe or other subpage.");
    return; // Don't run in iframes or other nonsense...
  } 

  //console.log (scriptID + "Starting up!");
  
  var timerVal = 0;
  var tries = 0;
  var maxTries = 20;
  
  function checkAndDeleteFilter() {
    var done = false;
    if (typeof holodeck == 'object') {
      if (holodeck._incoming_message_filters.length > 2) {
        var f = holodeck._incoming_message_filters.shift();
        if (f != undefined) {
          done = true;
          console.log(scriptID + 'Nailed it! Filter removed on page ' + location);
          console.log(scriptID + 'There are now ' + holodeck._incoming_message_filters.length + ' incoming message filters.');
        }
      }
    }
    if (!done && tries < maxTries) {
      tries = tries + 1
      console.warn(scriptID + 'Filter not yet created, waiting for it... [' + tries + '/' + maxTries + '] -- ' + location);
    } else {
      if (tries >= maxTries) {
        console.warn(scriptID + 'Got tired of waiting for holodeck to exist!' + location);
      }
      clearInterval(t)
    }
  }
  
  // console.log(scriptID + 'Launching filter destroyer! ' + location);
  var t = setInterval(checkAndDeleteFilter, 1000);
  
  
})();