Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name AnonFM Disqus comments
- // @namespace FM_vestchtchaniye
- // @include https://disqus.com/embed/comments/?base=default&f=anon-4*
- // @include https://anon.fm/*
- // @version 0.0.1
- // @grant none
- // ==/UserScript==
- switch (location.host) {
- case 'anon.fm':
- /* Embed Disqus in anon.fm */
- document.body.appendChild(document.createElement('div')).id = 'disqus_thread';
- let s = document.createElement('script');
- s.src = 'https://anon-4.disqus.com/embed.js';
- document.head.appendChild(s);
- break;
- case 'disqus.com':
- /* Remove all this shit */
- const shootList = [
- '.nav',
- '#footer',
- '.auth-section > .connect',
- ];
- const t = setInterval(() => {
- if (!document.querySelector(shootList[0]))
- return;
- clearInterval(t);
- shootList.forEach(sel => document.querySelectorAll(sel).forEach(el => el.remove()));
- }, 50);
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement