Greasy Fork

Greasy Fork is available in English.

Kissanime ad remover

try to take over the world!

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Kissanime ad remover
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  try to take over the world!
// @author       You
// @match        http://kissanime.ru/*
// @grant        none
// ==/UserScript==
// Anonymous "self-invoking" function


/* including jquery package */
(function() {
    // Load the script
    var script = document.createElement("SCRIPT");
    script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';
    script.type = 'text/javascript';
    script.onload = function() {
        var $ = window.jQuery;
        // Use $ here...
    };
    document.getElementsByTagName("head")[0].appendChild(script);
})();


// onload
window.onload = function() {


    // all the advertisement objects found by id in an array
    var advertisements = [
        // advertisement on episode list page
        $('#adsIfrme1'),
        // just in case advertisement objects
        $('#adsIfrme2'),
        $('#adsIfrme3'),
        $('#adsIfrme4'),
        $('#adsIfrme5'),
        //when watching anime advertisements
        $('#adsIfrme6'),
        $('#adsIfrme7'),
        //side bar advertisements
        $('div').filter(function() {
            return $(this).css('left') == '0px' &&
                $(this).css('position') == 'fixed' &&
                $(this).css('height') == '768px';
        })
    ];

    //for every ad if it exists remove it
    for (var ad of advertisements) {
            ad.remove();
    }
}