From fef7ce5662ba64e8cbc6cf6108a6d664e7a85d2f Mon Sep 17 00:00:00 2001 From: Ankit Yadav <4nkitd@gmail.com> Date: Sat, 10 Apr 2021 00:58:09 +0530 Subject: [PATCH] auto hide toolbar for all sites by default --- injection/injection.js | 16 +++++++++++++--- manifest.json | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/injection/injection.js b/injection/injection.js index e9441b8..0119be2 100644 --- a/injection/injection.js +++ b/injection/injection.js @@ -79,7 +79,6 @@ var toolbar_hide = ` function init() { - var hide_toolbar = localStorage.getItem('h4ck3r.hide'); if (!hide_toolbar){ localStorage.setItem('h4ck3r.hide', true); @@ -96,7 +95,7 @@ function init() { var elmnt = document.getElementById("toolbar_id_"); elmnt.style.top = localStorage.getItem('h4ck3r_position_top') ?? '10px'; - elmnt.style.left = localStorage.getItem('h4ck3r_position_bottom') ?? '-120px'; + elmnt.style.left = localStorage.getItem('h4ck3r_position_bottom') ?? '0px'; var reload_config = localStorage.getItem('h4ck3r.reload'); @@ -129,7 +128,18 @@ function init() { (function () { - init(); + var toolbar_needed = localStorage.getItem('h4ck3r.toolbar.needed'); + if (!toolbar_needed) { + localStorage.setItem('h4ck3r.toolbar.needed', false); + toolbar_needed = false; + } + console.log(toolbar_needed, toolbar_needed == 'true'); + + if (toolbar_needed == 'true') { + + init(); + + } })() diff --git a/manifest.json b/manifest.json index 2ba9aa9..8025e20 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "h4ck3r", - "version": "0.0.7", + "version": "0.0.8", "description": "All in one Red Team Developer Tool Kit", "browser_action": {