Greasy Fork is available in English.
Automatically hide ads on KissAnime pages. Also automatically hides the beta player ad.
当前为
// ==UserScript==
// @name KissAnime Auto Hide
// @version 1.0.1
// @description Automatically hide ads on KissAnime pages. Also automatically hides the beta player ad.
// @author G-Rex
// @match http://kissanime.ru/*
// @match https://kissanime.ru/*
// @grant none
// @run-at document-idle
//
// @namespace http://greasyfork.icu/users/154522
// ==/UserScript==
(function() {
'use strict';
setTimeout(hideAds, 3000);
})();
function hideAds() {
let hideAnchors = document.querySelectorAll('.divCloseBut a');
for(let i = 0; i < hideAnchors.length; i++) {
hideAnchors[i].onclick();
}
let videoAd = document.getElementById('videoAd');
if(videoAd) {
videoAd.parentNode.removeChild(videoAd);
}
let videoAdClose = document.getElementsByClassName('videoAdClose');
for(let i = 0; i < hideAnchors.length; i++) {
if(videoAdClose[i]) {
videoAdClose[i].parentNode.removeChild(videoAdClose[i]);
}
}
}