Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Aligerar portada de Artículos
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match https://www.meneame.net/articles
- // @icon https://www.google.com/s2/favicons?domain=meneame.net
- // @grant none
- // ==/UserScript==
- // ------------------------------------------------------
- // --- Añada subs que no le interesen a esta lista ---
- // --- Por ejemplo: [ 'gatos', 'perros', 'sapos' ] ---
- // ------------------------------------------------------
- let ignored_subs = [ 'libértame' ];
- (function() {
- 'use strict';
- let news_divs = document.getElementsByClassName("news-summary");
- for (let k in news_divs){
- if(news_divs[k].tagName != "DIV"){
- continue;
- }
- let this_entry = news_divs[k];
- let sub_tags = this_entry.getElementsByClassName("subname");
- //If text content of subname tag is on ignored subs, hide the entry
- try
- {
- let subname = sub_tags[0].innerText;
- if ( ignored_subs.includes(subname) ){
- this_entry.hidden = true;
- }
- else{
- }
- }
- catch
- {
- //Ignore errors
- }
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement