Greasy Fork is available in English.

HLTVNoBetting

Remove gambling content from HLTV.org

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name           HLTVNoBetting
// @namespace      ua.rkoten
// @description    Remove gambling content from HLTV.org
// @author         Roman Kotenko
// @version        1.4.1
// @match          https://www.hltv.org/*
// @grant          none
// @run-at         document-end
// @require        https://code.jquery.com/jquery-3.6.0.min.js
// ==/UserScript==

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

(function(){
    'use strict';
    var keywords = [
        '22bet',
        'Betting',
        'betway',
        'bitskins',
        'buff88',
        'egb',
        'ggbet',
        'ggking',
        'lootbet',
        'pinnacle',
        'thunderpick',
        'unibet',
        'unikrn',
        'xbet',
    ];
    function removeIfSponsoredClass(elements) {
        for (var i = 0; i < elements.length; ++i) {
            var element = elements[i];
            for (var j = 0; j < keywords.length; ++j) {
                var keyword = keywords[j];
                if (element.className.search(new RegExp('.*'+keyword+'.*')) != -1) {
                    element.remove();
                    break;
                }
            }
        }
    }
    function removeIfSponsoredContent(elements) {
        for (var i = 0; i < elements.length; ++i) {
            var element = elements[i];
            for (var j = 0; j < keywords.length; ++j) {
                var keyword = keywords[j];
                if (element.innerHTML.indexOf(keyword) != -1) {
                    element.remove();
                    break;
                }
            }
        }
    }

    $('.betting-listing')    .remove(); // betting coeffs listing on matchpage
    $('.betting-section')    .remove(); // section with fantasy games, betting analytics, etc. on matchpage
    $('#matchpage_1')        .remove(); // full size ad banner on matchpage
    $('.bsec')               .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
    $('.card-game')          .remove(); // match page epics card game banner
    $('.multi-bet-list')     .remove(); // sidebar betting block
    $('.kgN8P9bvyb2EqDJR')   .remove(); // matchpage ad block
    $('.v-wrapper')          .remove(); // useless vertical spaceres
    $('.footer-responsible-container').remove(); // "bet responsibly" footer
    $('.team-odds').remove();                              // sidebar featured match team odds
    $('.featured-match-container').css('height', '128px'); // fix container height correspondingly

    removeIfSponsoredClass($('div'));
    removeIfSponsoredClass($('a'));
    removeIfSponsoredContent($('.live-match-box'));                     // sidebar featured match block
    removeIfSponsoredContent($('.section-header.wide-widget'));         // matches page banner
    removeIfSponsoredContent($('.standard-box.featured-match-widget')); // event page featured match block
    removeIfSponsoredContent($('.widget-match-listing'));               // thunderpick sidebar match listing
    removeIfSponsoredContent($('.col-rek3'));
    removeIfSponsoredContent($('.three-quarter-width'));                // betting section on matchpage
}());