Skip to content

Instantly share code, notes, and snippets.

@ad48hp
Last active July 10, 2017 18:16
Show Gist options
  • Save ad48hp/54d9d606332c75e905cf85b22312c760 to your computer and use it in GitHub Desktop.
Save ad48hp/54d9d606332c75e905cf85b22312c760 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name KissCartoonAds1
// @namespace ad48
// @include http://kisscartoon.*/Cartoon/*
// @include https://kisscartoon.*/Cartoon/*
// @include http://kissanime.*/Anime/*
// @include https://kissanime.*/Anime/*
// @include http://kimcartoon.*/Cartoon/*
// @include https://kimcartoon.*/Cartoon/*
// @version 0.24
// @grant none
// ==/UserScript==
setTimeout(function() {setInterval(function(){
if(document.getElementsByTagName("video").length==0) {
var elms=document.getElementsByTagName("iframe");
for(i = 0; i < elms.length; i++){
if(/openload/.test(elms[i].getAttribute("src"))) {
document.location.href=elms[i].getAttribute("src");
}
}
}
else{
var a = document.createElement("a");
a.setAttribute("href",document.getElementsByTagName("video")[0].getAttribute("src"));
a.style.display = "none";
document.body.appendChild(a);
a.click();
}
},3500)},2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment