Greasy Fork is available in English.

多瑙去广告

多瑙网站视频与网站广告去除。

Stan na 02-02-2017. Zobacz najnowsza wersja.

// ==UserScript==
// @name         多瑙去广告
// @namespace    moe.jixun.dn-noad
// @version      1.0
// @description  多瑙网站视频与网站广告去除。
// @author       Jixun Moe<https://jixun.moe/>
// @include      http://*.dnvod.eu/*
// @include      https://*.dnvod.eu/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

var each = [].forEach;

function remove (el) {
    if (el && el.parentNode) el.parentNode.removeChild(el);
}

// Player AD removal.
if (window.PlayerConfig && window.PlayerConfig.desktopPlayer) {
    let p = window.PlayerConfig.desktopPlayer;
    p.l = p.r = p.d = p.u = p.pub_link = p.pub_surl = p.t = p.te = '';
}

const ads = '#msg_winw, .clickbg, .r-gg, #box, .bfq-r, .button-vip, [class^="ggw-"], .tgg, #myaudient2, .footerwhole, .gg';

addEventListener('DOMContentLoaded', function() {
    'use strict';

    var style = document.createElement('style');
    style.textContent = `
${ads} { display: none !important; }
.bfq-l { width: 1300px; }
#video > #a1 { text-align: center; }
`;
    document.head.appendChild(style);

    // delete all.
    each.call(document.querySelectorAll(ads), remove);
});