Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Kotaku Trending Articles Remover
- // @namespace http://your.homepage/
- // @version 0.2
- // @description Remove trending articles pane when it gets loaded
- // @author os42
- // @include https://www.kotaku.com.au/20*
- // @include http://www.kotaku.com.au/20*
- // @include https://www.gizmodo.com.au/20*
- // @include http://www.gizmodo.com.au/20*
- // @include https://www.lifehacker.com.au/20*
- // @include http://www.lifehacker.com.au/20*
- // @grant none
- // ==/UserScript==
- $(function() {
- var target = document.querySelector('#article_post');
- var observer = new MutationObserver(function(mutations) {
- mutations.forEach(function(mutation) {
- if (mutation.type === "childList" && mutation.previousSibling.id === "loading_trending_posts_icon") {
- $(mutation.addedNodes).each(function(i, node) {
- //if (node.id === "trending-river") {
- node.remove();
- //}
- });
- observer.disconnect();
- }
- });
- });
- // configuration of the observer:
- var config = { attributes: true, childList: true, characterData: true }
- // pass in the target node, as well as the observer options
- observer.observe(target, config);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement