Skip to content

Instantly share code, notes, and snippets.

@ZiTAL
Last active June 20, 2018 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZiTAL/c7c5c6be8f628c0ac820fdfe1a1b1296 to your computer and use it in GitHub Desktop.
Save ZiTAL/c7c5c6be8f628c0ac820fdfe1a1b1296 to your computer and use it in GitHub Desktop.
javascript / greasemonkey / tampermonkey: RTVE en DIRECTO-ren bideoetan elementuak ezabatzeko script-a
// ==UserScript==
// @name RtveDirectoHide
// @namespace RtveDirectoHide
// @description Rtve Zuzeneko elementuak ezabatu
// @include http://www.rtve.es/directo/*
// @include https://www.rtve.es/directo/*
// @grant none
// @version 1
// @license AGPL v3
// @run-at document-idle
// ==/UserScript==
(function()
{
'use strict';
var inter;
var RtveDirectoHide =
{
selectors : ['#replaceHead', '.col.c2', '.c1_listado', '.c1_intro'],
init : function()
{
var self = this;
var elements = document.querySelectorAll(self.selectors);
var l = elements.length;
if (l > 0)
{
for (var i = 0; i < l; i++)
{
if (elements[i] !== null)
elements[i].parentNode.removeChild(elements[i]);
}
}
else
{
window.clearInterval(inter);
inter = 0;
}
}
};
if (inter === undefined)
{
inter = window.setInterval(function()
{
RtveDirectoHide.init();
}, 1 * 1000);
}
})();
@ZiTAL
Copy link
Author

ZiTAL commented Jun 20, 2018

RTVE en Directo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment