From 4f63e229eda5f2a21051330365075d3f5ccbe702 Mon Sep 17 00:00:00 2001 From: Miner49ur <101815367+Miner49ur@users.noreply.github.com> Date: Wed, 4 Sep 2024 22:58:23 -0400 Subject: [PATCH] added more extension shortcuts and a credit --- entry/entry.html | 163 ++++++---------------------------------------- payload.mjs | 9 ++- payloads/index.js | 37 +++++++++-- 3 files changed, 58 insertions(+), 151 deletions(-) diff --git a/entry/entry.html b/entry/entry.html index d0c204c..04f31e1 100644 --- a/entry/entry.html +++ b/entry/entry.html @@ -12,8 +12,13 @@

Rigtools | Devtools Code Execution

Press Q for evaluating code under extension id

-

Press L for a hardcoded shortcut to - ls filter +

Or press 1-5 for some hardcoded extensions

+

+ ls filter + goguardian + aristotle + iboss + cisco umbrella

Press M for evaluating under devtools context @@ -35,10 +40,11 @@

Rigtools | Devtools Code Execution

} body { - background-color:#1e2030; - color: white; - font-family: Arial, Helvetica, sans-serif; - overflow: hidden; + font-family: Arial, sans-serif; + background-color: #202124; + color: #fff; + margin: 0; + padding: 20px; } a { @@ -46,16 +52,11 @@

Rigtools | Devtools Code Execution

} .main { - top: 50%; - left: 50%; - position: absolute; - transform: translate(-50%, -50%); - border: 3px solid white; - font-weight: bold; - padding: 5%; - border-radius: 10px; + max-width: 800px; + margin: 0 auto; + margin-top: 200px; + font-weight: bold; text-align: center; - background-color: #24273a; } .button { @@ -72,134 +73,11 @@

Rigtools | Devtools Code Execution

border-radius: 5px; } - #ls-filter { + .hardcoded { background-color: #f44336; } - - - - + \ No newline at end of file diff --git a/payload.mjs b/payload.mjs index fe7dbaa..41480cd 100644 --- a/payload.mjs +++ b/payload.mjs @@ -266,9 +266,12 @@ document.querySelector('#extdbg').onclick = function () { dbgext(false); } - document.querySelector('#ls-filter').onclick = function () { - dbgext(false, "adkcpkpghahmbopkjchobieckeoaoeem"); - } + document.querySelectorAll('.hardcoded').forEach(el => {el.onclick = function () { + let extid = el.getAttribute("ext"); + console.log(el.innerText, extid); + dbgext(false, extid); + } + }); document.querySelector('#cleanup').onclick = function () { dbgext(true); } diff --git a/payloads/index.js b/payloads/index.js index f9691b3..7cd8643 100644 --- a/payloads/index.js +++ b/payloads/index.js @@ -27,6 +27,7 @@ const managementTemplate = `

-->
+ `; let savedExtList = []; @@ -337,13 +338,21 @@ function updateExtensionStatus(extlist_element) { const icon = e.icons.find((ic) => ic.size === 128) ?? e.icons.at(-1); let card = createExtensionCard(e.name, e.id, e.enabled, icon.url); + + let cardInput = card.querySelector("input") - card.querySelector("input").addEventListener("change", (event) => { + cardInput.addEventListener("change", (event) => { chrome.management.setEnabled(e.id, event.target.checked); // setTimeout(function () { // updateExtensionStatus(extlist_element); // }, 200); }); + + card.querySelector(".extension-icon").addEventListener("click", () => { + cardInput.checked = !cardInput.checked; + cardInput.dispatchEvent(new Event('change')); + }) + // const itemElement = document.createElement("li"); // itemElement.textContent = `${e.name} (${e.id}) `; // const aElem = document.createElement('a'); @@ -414,7 +423,8 @@ h1 { } .extension-card { - background-color: #292a2d; +/* background-color: #292a2d; */ + border: 2px solid #292a2d; margin-bottom: 10px; padding: 15px; border-radius: 8px; @@ -423,9 +433,15 @@ h1 { align-items: center; } +.extension-card:has(input:checked) { + background-color: #292a2d; + border: 2px solid #0000; +} + .extension-icon { width: 32px; padding-right: 20px; + cursor: pointer; } .extension-name { @@ -438,7 +454,7 @@ h1 { position: relative; display: inline-block; width: 60px; - height: 34px; + height: 36px; } .toggle-switch input { @@ -454,9 +470,11 @@ h1 { left: 0; right: 0; bottom: 0; - background-color: #ccc; + background-color: #0000; transition: .4s; border-radius: 34px; + border: 2px solid #292a2d; + } .slider:before { @@ -472,11 +490,12 @@ h1 { } input:checked+.slider { - background-color: #2196F3; + background-color: #0df; + border: 2px solid #222; } input:checked+.slider:before { - transform: translateX(26px); + transform: translateX(24px); } button { @@ -530,6 +549,12 @@ button:disabled { border-radius: 10px; font-family: Consolas; } +.footer { + display: inline; + float: right; + margin: 10px 5px; + color: #83898e; +} `; onload = async function x() {