Dropbooks Romover

Remove ads and skip datail page on Dropbooks

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name               Dropbooks Romover
// @namespace          http://hogehoge/
// @version            1.*.1
// @description        Remove ads and skip datail page on Dropbooks
// @description:ja     ドロップブックスの広告の削除・詳細ページのスキップ
// @author             H. Amami
// @match              *://dropbooks.tv/*
// @grant              none
// ==/UserScript==

function deleteThis(obj) {
    obj.parentNode.removeChild(obj);
}

if (location.href.indexOf("/detail/") === -1) {
    deleteThis(document.getElementById("main2col").getElementsByTagName("center")[0]);
//    deleteThis(document.getElementsByClassName("content_list")[0]);
    deleteThis(document.getElementById("ad_tsuibi"));
    var a = document.getElementsByTagName("a");
    var h = "";
    for (var i = 0, max = a.length; i < max; i++) {
        h = a[i].href;
        if (h.indexOf("/detail/") > -1) {
            a[i].href = h.replace("/detail/", "/detail/download_zip/");
        }
    }
}

var cnt = 0;

function b() {
    d = document.getElementById("octopus-scr");
    if (d) {
        clearInterval(c);
        deleteThis(d);
        document.body.style.paddingTop = 0;
    }
    if (++cnt > 5) clearInterval(c);
}

var c = setInterval(b, 500);