relanium

usuniecie tagow

Stan na 23-03-2018. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name		relanium
// @namespace		http://www.wykop.pl/ludzie/wytrzzeszcz/
// @description		usuniecie tagow
// @author		wytrzeszcz
// @version		0.5
// @grant		none
// @include		http://www.wykop.pl/*
// @include		https://www.wykop.pl/*
// @run-at 		document-end
// ==/UserScript==
(function() {
 const relanium_run= function(){
			
			if(localStorage.getItem("relanium")==1) 
			{
			var pat=new RegExp("wykop.pl/tag/");
			entrys=document.getElementsByClassName("entry");
			Array.prototype.forEach.call(entrys, function(el){ if (pat.test(el.innerHTML)) el.innerHTML="XD";});
			}
			};

const relanium_preper= function(){

relanium_active="https://www.wykop.pl/cdn/c3201142/comment_8e9RZcTxgyltQnqjuW23rASgR7IkIzyd.jpg";
relanium_pasive="https://www.wykop.pl/cdn/c3201142/comment_aKehHX4vBJPPtjWnQDYStHE7ZXthb6fI.jpg";
relanium=document.createElement("img");
relanium.id="relanium";
if(localStorage.getItem("relanium")==1) relanium.src=relanium_active;
else relanium.src=relanium_pasive;
relanium.onclick =function(){
console.log("dupa");
if(localStorage.getItem("relanium")==1) 
{
	localStorage.setItem("relanium", 0);
	img=document.getElementById("relanium");
	img.src=relanium_pasive;
}
else 
{
	localStorage.setItem("relanium", 1);
	img=document.getElementById("relanium");
	img.src=relanium_active;
}
}
;
av=document.getElementsByClassName("logged-user")[0];
av.appendChild(relanium);
}
				
				
	//Dla ajaxowej aktualizacji postow na mirko
	$("#newEntriesCounter").click(function(){
		setTimeout(relanium_run, 1000);
	});

	//Po rozwinieciu komentarzy
	$(".more").click(function(){
		setTimeout(relanium_run, 1000);
	});

	$(document).ready(function(){
	    relanium_preper();
		relanium_run();
	});



})();