71
CHE MUSICA STAI ASCOLTANDO / Neon - Information of death
« Ultimo post da Leonida29 il Agosto 20, 2019, 11:07:43 am »Per pochi ma buoni.... da sempre!!!
// ==UserScript==
// @name youtube
// @namespace Violentmonkey Scripts
// @match https://www.youtube.com/*
// @grant none
// @run-at document-idle
// ==/UserScript==
window.setTimeout( function(){
let tohide = document.getElementsByClassName('ytp-ce-element-show'),
el = document.createElement('button');
el.setAttribute('style','position:relative;dispaly:block;width:35px; \
height:25px;background:green;border:3px outset black; margin_top:3px;')
document.getElementById('info-contents').prepend(el)
el.addEventListener('click',function(){
for(i=0; i<tohide.length; i++){
tohide[i].style.display == 'none' ? tohide[i].style.display = 'block' : tohide[i].style.display = 'none' ;
}
el.style.backgroundColor == 'green' ? el.style.backgroundColor = 'red' : el.style.backgroundColor = 'green';
})
},2000)
/*****************************************************
* *
* se non viene visualizzato il bottone, *
* provate a mettere un numero più alto al time out *
* ,1000) equivale ad 1 secondo *
* *
*****************************************************/