mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-04-28 03:53:07 -07:00
f
This commit is contained in:
@@ -6,7 +6,12 @@
|
||||
(() => {
|
||||
try {
|
||||
const host = window.location.hostname;
|
||||
if (host === "localhost" || host === "127.0.0.1") return;
|
||||
const port = window.location.port;
|
||||
if (
|
||||
host === "localhost" ||
|
||||
host === "127.0.0.1" ||
|
||||
port === "3377"
|
||||
) return;
|
||||
} catch (e) {}
|
||||
const KEY = 'htSummerDiscountsDismissed';
|
||||
const IMG = '/ima * HackTricks AI Chat Widget v1.17 – enhanced resizable sidebar
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
{{/if}}
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
{{#if copy_fonts}}
|
||||
<link rel="stylesheet" href="{{ path_to_root }}fonts/fonts.css">
|
||||
{{/if}}
|
||||
@@ -60,15 +60,6 @@
|
||||
</script>
|
||||
<!-- Start loading toc.js asap -->
|
||||
<script src="{{ path_to_root }}toc.js"></script>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
var bsa_optimize = document.createElement('script');
|
||||
bsa_optimize.type = 'text/javascript';
|
||||
bsa_optimize.async = true;
|
||||
bsa_optimize.src = 'https://cdn4.buysellads.net/pub/hacktricks.js?' + (new Date() - new Date() % 600000);
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(bsa_optimize);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="body-container">
|
||||
@@ -324,6 +315,12 @@
|
||||
<div class="bsa-crawler-slot" aria-hidden="true">
|
||||
<div id="bsa-zone_1773065859037-5_123456"></div>
|
||||
</div>
|
||||
<div class="bsa-pageviews-slot" aria-hidden="true">
|
||||
<div id="bsa-zone_1770368463-7_123456"></div>
|
||||
</div>
|
||||
<div class="bsa-fixedfooter-slot" aria-hidden="true">
|
||||
<div id="bsa-zone_1770367111944-8_123456"></div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<nav class="nav-wrapper" aria-label="Page navigation">
|
||||
|
||||
@@ -345,6 +345,24 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.bsa-pageviews-slot {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.bsa-fixedfooter-slot {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 0px) and (min-height: 0px) {
|
||||
#bsa-zone_1773736844679-9_123456 {
|
||||
min-height: 100px;
|
||||
@@ -358,6 +376,14 @@
|
||||
min-height: 1px;
|
||||
}
|
||||
|
||||
#bsa-zone_1770368463-7_123456 {
|
||||
min-height: 1px;
|
||||
}
|
||||
|
||||
#bsa-zone_1770367111944-8_123456 {
|
||||
min-height: 1px;
|
||||
}
|
||||
|
||||
#bsa-zone_1773737041447-5_123456 {
|
||||
min-height: 0px;
|
||||
}
|
||||
@@ -375,6 +401,14 @@
|
||||
#bsa-zone_1773065859037-5_123456 {
|
||||
min-height: 1px;
|
||||
}
|
||||
|
||||
#bsa-zone_1770368463-7_123456 {
|
||||
min-height: 1px;
|
||||
}
|
||||
|
||||
#bsa-zone_1770367111944-8_123456 {
|
||||
min-height: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 880px) and (min-height: 0px) {
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
var sponsorCTA = sponsorSide && sponsorSide.querySelector(".sponsor-cta")
|
||||
var sponsorSideBsa = document.querySelector(".sidesponsor-bsa")
|
||||
var topSponsorBsa = document.querySelector(".topsponsor-bsa")
|
||||
var crawlerSlot = document.querySelector(".bsa-crawler-slot")
|
||||
var pageviewsSlot = document.querySelector(".bsa-pageviews-slot")
|
||||
|
||||
var bottomSponsor = document.querySelector(".bottomsponsor")
|
||||
var bottomSponsorImg = bottomSponsor && bottomSponsor.querySelector("img")
|
||||
@@ -23,12 +25,18 @@
|
||||
!bottomSponsor ||
|
||||
!sponsorSideBsa ||
|
||||
!topSponsorBsa ||
|
||||
!crawlerSlot ||
|
||||
!pageviewsSlot ||
|
||||
!bottomSponsorBsa
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
var BSA_SCRIPT_BASE = "https://cdn4.buysellads.net/pub/hacktricks.js"
|
||||
var BSA_FIXED_LEADERBOARD_FALLBACK = {
|
||||
brokenId: "bsa-zone_1773065859037-5_123456",
|
||||
actualId: "bsa-zone_1770367111944-8_123456",
|
||||
}
|
||||
var bsaScriptPromise
|
||||
|
||||
function getBsaScriptSrc() {
|
||||
@@ -49,14 +57,35 @@
|
||||
}
|
||||
|
||||
bsaScriptPromise = new Promise(function(resolve, reject) {
|
||||
var originalMapGet = Map.prototype.get
|
||||
var restoreMapGet = function() {
|
||||
Map.prototype.get = originalMapGet
|
||||
}
|
||||
|
||||
Map.prototype.get = function(key) {
|
||||
if (
|
||||
key === BSA_FIXED_LEADERBOARD_FALLBACK.brokenId &&
|
||||
!this.has(key) &&
|
||||
this.has(BSA_FIXED_LEADERBOARD_FALLBACK.actualId)
|
||||
) {
|
||||
return originalMapGet.call(this, BSA_FIXED_LEADERBOARD_FALLBACK.actualId)
|
||||
}
|
||||
|
||||
return originalMapGet.call(this, key)
|
||||
}
|
||||
|
||||
var bsaOptimize = document.createElement("script")
|
||||
bsaOptimize.type = "text/javascript"
|
||||
bsaOptimize.async = true
|
||||
bsaOptimize.src = getBsaScriptSrc()
|
||||
bsaOptimize.onload = function() {
|
||||
restoreMapGet()
|
||||
resolve(bsaOptimize)
|
||||
}
|
||||
bsaOptimize.onerror = reject
|
||||
bsaOptimize.onerror = function(error) {
|
||||
restoreMapGet()
|
||||
reject(error)
|
||||
}
|
||||
;(
|
||||
document.getElementsByTagName("head")[0] ||
|
||||
document.getElementsByTagName("body")[0]
|
||||
@@ -146,6 +175,7 @@
|
||||
|
||||
async function loadBsaSponsor() {
|
||||
bottomSponsorBsa.style.display = "block"
|
||||
|
||||
if (window.matchMedia("(min-width: 880px)").matches) {
|
||||
sponsorSideBsa.style.display = "block"
|
||||
topSponsorBsa.style.display = "none"
|
||||
@@ -153,6 +183,7 @@
|
||||
sponsorSideBsa.style.display = "none"
|
||||
topSponsorBsa.style.display = "block"
|
||||
}
|
||||
|
||||
await ensureBsaScript()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user