Skip to content

Commit

Permalink
Recover pick rate function from betting block.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfcon authored Jul 11, 2022
1 parent 29ba464 commit 7a5d900
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions RIP-hltv-BET.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// @name RIP HLTV BET
// @name:zh-CN HLTV 广告去除插件
// @namespace https://github.com/wolfcon/RIP-HLTV-BET
// @version 1.9
// @version 1.10
// @description Remove hltv.org Annoy AD
// @description:zh-cn 清除那些🤮背景赌博广告.
// @author Frank
Expand All @@ -15,7 +15,7 @@

const filters = [
'[class*="yabo"]',
'[id*="betting"]',
//'[id*="betting"]',
'[href*="bet"]:not([href^="/"])',
'[class*="regional"]',
'[class*="world"]',
Expand All @@ -40,10 +40,19 @@ $(document.body).css("background-color", $(".navbar").css("background-color"));

(function removeTopAds() {
var topDiv = document.getElementsByClassName("logoCon")[0];
if (topDiv == null) return;
var adCount = topDiv.children.length - 1;

while (adCount > 0) {
topDiv.removeChild(topDiv.lastElementChild);
adCount--;
}
})();

(function removeBettingTableInMatchDetail() {
setTimeout(function() {
var bettingDiv = document.getElementById("betting");
if (bettingDiv == null) return;
bettingDiv.removeChild(bettingDiv.firstElementChild);
}, 50);
})();

0 comments on commit 7a5d900

Please sign in to comment.