Hack Forums
Tired of Pokemon Go posts on "View New Posts"? Check this - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5)
+---- Thread: Tired of Pokemon Go posts on "View New Posts"? Check this (/showthread.php?tid=5344157)



Tired of Pokemon Go posts on "View New Posts"? Check this - Neeeeeeeeeel.- - Jul 19, 2016

Are you tired of it?

Download Greasemonkey (or any userscript browser app) and add my userscript.

(CHROME ALTERNATIVE)

Since "View New Posts" uses the forum search engine, the script affects the whole search engine. It means that if you use the search, you won't see any post from "Pokemon GO" section.

It justs deletes the line when it find it's from "Pokemon GO" section. Hope you enjoy it.

I can assist you installing it. Just HMU.

PHP Code

<?php 
// ==UserScript==
// @name        HackForums Anti-Pokemon Go
// @namespace   hfapgo
// @description The script deletes all threads from Pokemon GO section (it also does it when you click "View New Posts")
// @version     1.0.0
// @grant       none
// @author      Neeeeeeeeeel.-
// @match      *://*.hackforums.net/search*
// @match      *://hackforums.net/search*
// ==/UserScript==

setTimeout(function(){
  if (
document.getElementsByClassName('quick_keys').length > 0){
    var 
t = document.getElementsByClassName('quick_keys')[0];
    
t = t.children[1];
    var 
length = t.children[0].children.length;
    for (var 
i = 0; i < length; i++){
      var 
tr = t.children[0].children[i];
      if (!
tr || tr.children.length < 3){
        continue;
      }
      if (
tr.children[2].innerHTML.match(/Pokemon GO/i)){
        
t.children[0].removeChild(tr);
      }
    }
  }
}, 
1000); 



* - Jаson - Jul 19, 2016

I was waiting for someone to create this. Thanks!