diff --git a/theme/css/chrome.css b/theme/css/chrome.css
index cdc67c345..2211a412c 100644
--- a/theme/css/chrome.css
+++ b/theme/css/chrome.css
@@ -52,6 +52,20 @@ a > .hljs {
.menu-bar-link:hover {
color: var(--menu-bar-link-color-hover);
}
+.menu-bar-link-request-update,
+.menu-bar-link-request-update:visited {
+ display: inline-flex;
+ align-items: center;
+ border-radius: 6px;
+ padding: 6px 10px;
+ color: #ffffff;
+ background: #d12f1f;
+ font-weight: 700;
+}
+.menu-bar-link-request-update:hover {
+ color: #ffffff;
+ background: #f04b36;
+}
#menu-bar.sticky,
#menu-bar-hover-placeholder:hover + #menu-bar,
#menu-bar:hover,
@@ -278,9 +292,20 @@ body.sidebar-visible #menu-bar {
background: inherit;
font-size: inherit;
}
+#menubar-collapse-popup .menu-bar-link-request-update,
+#menubar-collapse-popup .menu-bar-link-request-update:visited {
+ margin: 6px 8px;
+ padding: 8px 12px;
+ color: #ffffff;
+ background: #d12f1f;
+}
#menubar-collapse-popup .menu-bar-link:hover {
background-color: var(--theme-hover);
}
+#menubar-collapse-popup .menu-bar-link-request-update:hover {
+ color: #ffffff;
+ background: #f04b36;
+}
/* Languages Menu Popup */
diff --git a/theme/index.hbs b/theme/index.hbs
index 2c8040f54..2c1687ab1 100644
--- a/theme/index.hbs
+++ b/theme/index.hbs
@@ -160,6 +160,9 @@
+
@@ -177,6 +180,7 @@
+
@@ -466,6 +470,27 @@
if (btn) { btn.click(); }
});
});
+ document.querySelectorAll('[data-research-request-link="true"]').forEach(function (el) {
+ try {
+ var currentUrl = new URL(window.location.href);
+ var allowedHosts = ['hacktricks.wiki', 'cloud.hacktricks.wiki'];
+ if (
+ allowedHosts.indexOf(currentUrl.hostname.toLowerCase()) === -1 ||
+ (currentUrl.protocol !== 'https:' && currentUrl.protocol !== 'http:')
+ ) {
+ return;
+ }
+ currentUrl.username = '';
+ currentUrl.password = '';
+ currentUrl.search = '';
+ currentUrl.hash = '';
+ var target = new URL('https://tools.hacktricks.wiki/hacktricks-research-request/index.html');
+ target.searchParams.set('origin', currentUrl.href);
+ el.href = target.toString();
+ } catch (_error) {
+ el.href = 'https://tools.hacktricks.wiki/hacktricks-research-request/index.html';
+ }
+ });
var translateBtn = document.querySelector('[data-toggle-translations="true"]');
if (translateBtn) {
translateBtn.addEventListener('click', function (e) {