HLTVNoBetting

Hide gambling content from HLTV.org

当前为 2018-07-06 提交的版本,查看 最新版本

// ==UserScript==
// @name           HLTVNoBetting
// @namespace      ua.rkot
// @description    Hide gambling content from HLTV.org
// @author         Roman Kotenko (github:rkoten)
// @version        1.0.3
// @include        https://www.hltv.org/*
// @grant          none
// @run-at         document-end
// @require        https://code.jquery.com/jquery-3.3.1.min.js
// ==/UserScript==

// It is expected that an adblock is on (author recommends uBlock Origin);
// this script removes betting leftovers.

(function(){
    'use strict';
    function removeByKey(elems, key) {
        for (var i = 0; i < elems.length; ++i) {
            if (elems[i].innerHTML.indexOf(key) != -1) {
                elems[i].remove();
            }
        }
    }

    $('.betting-listing')    .remove(); // betting coeffs listing on matchpage
    $('#matchpage_1')        .remove(); // full size ad banner on matchpage
    $('.navbets')            .remove(); // navigation bar bets page link
    $('.footer-responsible') .remove(); // bet responsibly message in site footer
    $('.live-match-sub-text').remove(); // bet responsibly message in featured match footer
    $('.buff-box')           .remove(); // sidebar buff88 banner

    $('.team-odds').remove();                              // sidebar featured match team odds
    $('.featured-match-container').css('height', '128px'); // fix container height correspondingly

    removeByKey($('.live-match-box'), 'betway');            // sidebar betway match block
    removeByKey($('.section-header.wide-widget'), 'buff8'); // matches page buff88 banner
}());

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址