Selective Signature

Automatically disables your signature on all posts outside of a specific forum category

当前为 2016-11-28 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Selective Signature
  3. // @version 1.0
  4. // @description Automatically disables your signature on all posts outside of a specific forum category
  5. // @author Mr Whiskey
  6. // @match https://hackforums.net/showthread.php?*
  7. // @match https://hackforums.net/newreply.php?*
  8. // @match https://hackforums.net/newthread.php?*
  9. // @namespace http://www.fuckboygamers.club
  10. // ==/UserScript==
  11.  
  12. if (!/Illuminati/i.test (document.body.innerHTML)) // Checks for "Illuminati" on the page. If not found, continues
  13. if(!/Crews and Clans Private Forums/i.test (document.body.innerHTML)) // Checks for "Crews and Clans Private Forums" on page if "Illuminati" is on the page. If not found, continues
  14. boxChecker([].slice.call(document.querySelectorAll('input[type="checkbox"]'))); // Runs boxChecker, unchecking every checkbox.
  15. else // OPTIONAL:
  16. alert("Signature Enabled"); // If you want to know when your signature will be displayed
  17.  
  18. function boxChecker(boxes){boxes.forEach(function(box){box.checked = false;});} // Unchecks every checkbox