Skip to content

Commit

Permalink
Set background color with the navigation bar style
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfcon authored Nov 29, 2021
1 parent bec2e28 commit de8b52d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 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.4
// @version 1.5
// @description Remove hltv.org Annoy AD
// @description:zh-cn 清除那些🤮背景赌博广告.
// @author Frank
Expand Down Expand Up @@ -32,6 +32,9 @@ const filters = [
document.body.removeAttribute("data-href");
document.body.removeAttribute("style");

// set background to bar Color
$(document.body).css("background-color", $(".navbar").css("background-color"));

(function removeTopAds() {
var topDiv = document.getElementsByClassName("logoCon")[0];
var adCount = topDiv.children.length - 1;
Expand All @@ -40,4 +43,4 @@ document.body.removeAttribute("style");
topDiv.removeChild(topDiv.lastElementChild);
adCount--;
}
})();
})();

0 comments on commit de8b52d

Please sign in to comment.