From 52cb43473331163dfa5220c5247b0b0723c9d690 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Tue, 19 May 2020 07:23:27 +0200 Subject: [PATCH] Add file protocol to status button --- resources/index.html | 3 +++ resources/js/index.js | 3 ++- resources/style/index.css | 5 +++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/index.html b/resources/index.html index 067ab61..fe137cb 100644 --- a/resources/index.html +++ b/resources/index.html @@ -28,6 +28,9 @@ Vulnerable connection (http) + + Local file + diff --git a/resources/js/index.js b/resources/js/index.js index c0beaeb..97afffa 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -613,8 +613,9 @@ function updateNavigation() { } function updateStatusButton() { + let protocol = services[selectedService].view.getURL().split('://')[0]; + if (!protocol) protocol = 'unknown'; for (const c of statusButton.children) { - const protocol = services[selectedService].view.getURL().split('://')[0]; if (c.classList.contains(protocol)) c.classList.add('active'); else c.classList.remove('active'); } diff --git a/resources/style/index.css b/resources/style/index.css index eb5e1d1..22f25ed 100644 --- a/resources/style/index.css +++ b/resources/style/index.css @@ -196,8 +196,9 @@ body { background: transparent; } -#history #status .unknown { - opacity: 0.4; +#history #status .unknown, +#history #status .file { + color: #888; } #history #status .https {