SHARE
TWEET

IPB unread content

a guest Oct 17th, 2016 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         ciclism.ro unread content
  3. // @namespace    http://www.ciclism.ro/
  4. // @version      0.1
  5. // @description  meh
  6. // @author       otsdr
  7. // @match        http*://www.ciclism.ro/forums/discover/*
  8. // @grant        unsafeWindow
  9. // ==/UserScript==
  10.  
  11.  
  12. (() => {
  13.     'use strict';
  14.  
  15.     unsafeWindow.addEventListener("load", () => {
  16.         const d = unsafeWindow.document;
  17.         const action = "?do=getNewComment";
  18.         const links = [...d.querySelectorAll("h2.ipsStreamItem_title > .ipsContained > a")].filter(elt => elt.href.lastIndexOf('?') === -1);
  19.         links.forEach(elt => elt.href += action);
  20.         unsafeWindow.console.log(`Ciclism.ro unread content: modified ${links.length} links.`);
  21.     }, false);
  22. })();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top