Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @author Ryzen111
- // @name Anime-Sharing Hide Posts
- // @description Hide posts of other users
- // @include http://www.anime-sharing.com/forum/hentai-games-38/*
- // @include https://www.anime-sharing.com/forum/hentai-games-38/*
- // @include http://www.anime-sharing.com/forum/miscellaneous-45/*
- // @include https://www.anime-sharing.com/forum/miscellaneous-45/*
- // @include https://www.anime-sharing.com/forum/torrents-47/*
- // @include http://www.anime-sharing.com/forum/torrents-47/*
- // @version 1.0.0
- // ==/UserScript==
- var pageHost = window.location.hostname;
- var all_links = "";
- var all_linksS = "";
- if (pageHost == "www.anime-sharing.com"){
- all_links = getElementsByXPath("//ol[@id='threads']/li[*]");
- all_linksS = getElementsByXPath("//ol[@id='stickies']/li[*]");
- }
- //Normal Post
- for (var link = 0; link < all_links.length; link++) {
- var node = all_links[link].innerText;
- if (node.includes("USERYOUWANTTOHIDEPOST") ||
- node.includes("USERYOUWANTTOHIDEPOST") ||
- node.includes("USERYOUWANTTOHIDEPOST")){
- all_links[link].style.display = "none";
- }
- }
- //Sticky Post
- for (var linkS = 0; linkS < all_linksS.length; linkS++) {
- var nodeS = all_linksS[linkS].innerText;
- if (nodeS.includes("USERYOUWANTTOHIDEPOST") ||
- nodeS.includes("USERYOUWANTTOHIDEPOST") ||
- nodeS.includes("USERYOUWANTTOHIDEPOST")){
- all_linksS[linkS].style.display = "none";
- }
- }
- function getElementsByXPath(xpath){
- var result = document.evaluate(xpath, document, null, 0, null);
- var nodes = new Array();
- i = 0;
- while (node = result.iterateNext()) {
- nodes[i] = node;
- i++;
- }
- return nodes;
- }
Add Comment
Please, Sign In to add comment