summaryrefslogtreecommitdiff
path: root/html/display-panel.html
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-08-06 17:17:45 +0200
committerWojtek Kosior <koszko@koszko.org>2021-08-06 17:17:45 +0200
commit792fbe187bdffca4a748e88d66ea29f8936ae5c8 (patch)
tree5ccc504bd06cbae6bba12bc4f2e060fa2ad96ec3 /html/display-panel.html
parent90896bcfeb4e55c78d9a15700a6a4580f0df6365 (diff)
downloadbrowser-extension-792fbe187bdffca4a748e88d66ea29f8936ae5c8.tar.gz
browser-extension-792fbe187bdffca4a748e88d66ea29f8936ae5c8.zip
Facilitate installation of scripts from the repository
This commit includes: * removal of page_info_server * running of storage client in popup context * extraction of some common CSS to a separate file * extraction of scripts import view to a separate file * addition of a facility to conveniently clone complex structures from DOM (in DOM_helpers.js) * addition of hydrilla repo url to default settings * other minor changes and of course changes related to the actual installation of scripts from the repo
Diffstat (limited to 'html/display-panel.html')
-rw-r--r--html/display-panel.html123
1 files changed, 71 insertions, 52 deletions
diff --git a/html/display-panel.html b/html/display-panel.html
index d8d7f5d..1b9c77b 100644
--- a/html/display-panel.html
+++ b/html/display-panel.html
@@ -7,35 +7,25 @@
<head>
<meta charset="utf-8"/>
<title>Hachette - page settings</title>
+ <link type="text/css" rel="stylesheet" href="base.css" />
<style>
- input[type="radio"], input[type="checkbox"] {
- display: none;
- }
-
body {
width: 300px;
height: 300px;
}
- .show_next:not(:checked)+* {
- display: none;
+ ul {
+ padding-inline-start: 15px;
}
- .show_hide_next2:not(:checked)+* {
- display: none;
+ .bold {
+ font-weight: bold;
}
- .show_hide_next2:checked+*+* {
- display: none;
- }
-
- .hide {
- display: none;
- }
-
- #possible_patterns_chbx:not(:checked)+label span#triangle:first-child+span,
- #possible_patterns_chbx:not(:checked)+label+*,
- #possible_patterns_chbx:checked+label span#triangle:first-child {
+ .unroll_chbx:not(:checked)+*+label span.triangle:first-child+span.triangle,
+ .unroll_chbx:checked+*+label span.triangle:first-child,
+ .unroll_chbx:not(:checked)+*,
+ .unroll_chbx:not(:checked)+*+label+* {
display: none;
}
@@ -51,31 +41,73 @@
<span></span>
<button>View in settings</button>
</li>
+ <li id="query_match_li_template" class="queried_pattern_match" data-template="li">
+ <div>
+ <span>pattern:</span>
+ <span class="bold" data-template="pattern"></span>
+ <button data-template="btn">Install</button>
+ </div>
+ <div id="unrollable_component_template" data-template="unroll_container">
+ <span data-template="component_label">payload:</span>
+ <input type="checkbox" class="unroll_chbx" data-template="chbx"></input>
+ <br data-template="br"/>
+ <label class="bold" data-template="lbl">
+ <span data-template="triangle">
+ <span class="triangle">&#x23F5;</span>
+ <span class="triangle">&#x23F7;</span>
+ </span>
+ <span data-template="component"></span>
+ </label>
+ <div data-template="unroll"></div>
+ </div>
+ </li>
</div>
- <h2 id="page_url_heading"></h2>
-
- <input id="show_privileged_notice_chbx" type="checkbox" class="show_next"></input>
- <h3>Privileged page</h3>
+ <input id="show_install_view_chbx" type="checkbox" class="show_hide_next2"></input>
+ <div id="install_view">
+ <IMPORT html/import_frame.html />
+ <!--
+ <div id="install_status"></div>
+ <label for="show_install_chbx" class="bold">Cancel install</label>
+ <button id="commit_install_but">Commit install</button>
+ -->
+ </div>
+ <div id="main_view">
+ <h2 id="page_url_heading"></h2>
- <input id="show_page_state_chbx" type="checkbox" class="show_next"></input>
- <div>
- <input id="possible_patterns_chbx" type="checkbox"></input>
- <label for="possible_patterns_chbx">
- <h3>
- <span id="triangle">&#x23F5;</span><span>&#x23F7;</span>
- Possible patterns
- </h3>
- </label>
- <ul id="possible_patterns"></ul>
+ <input id="show_privileged_notice_chbx" type="checkbox" class="show_next"></input>
+ <h3>Privileged page</h3>
- <input id="connected_chbx" type="checkbox" class="show_hide_next2"></input>
+ <input id="show_page_state_chbx" type="checkbox" class="show_next"></input>
<div>
- <h3>
- Matched pattern: <span id="pattern">...</span>
+ <input id="possible_patterns_chbx" type="checkbox" class="unroll_chbx"></input>
+ <span></span>
+ <label for="possible_patterns_chbx">
+ <h3>
+ <span class="triangle">&#x23F5;</span>
+ <span class="triangle">&#x23F7;</span>
+ Possible patterns
+ </h3>
+ </label>
+ <ul id="possible_patterns"></ul>
+
+ <input id="connected_chbx" type="checkbox" class="show_hide_next2"></input>
+ <div>
+ Matched pattern: <span id="pattern" class="bold">...</span>
<button id="view_pattern" class="hide">
View in settings
</button>
+ <br/>
+ Blocked: <span id="blocked" class="bold">...</span>
+ <br/>
+ Payload: <span id="payload" class="bold">...</span>
+ <button id="view_payload" class="hide">
+ View in settings
+ </button>
+ <h3>Injected</h3>
+ <div id="container_for_injected">
+ <span id="none_injected">None</span>
+ </div>
<input id="query_started_chbx" type="checkbox" class="show_hide_next2"></input>
<div id="container_for_repo_responses">
<h3>Queried from repositories</h3>
@@ -83,24 +115,11 @@
<button id="query_pattern">
Search for matching patterns
</button>
- </h3>
- <h3>
- Blocked: <span id="blocked">...</span>
- </h3>
- <h3>
- Payload: <span id="payload">...</span>
- <button id="view_payload" class="hide">
- View in settings
- </button>
- </h3>
- <h3>Injected</h3>
- <div id="container_for_injected">
- <span id="none_injected">None</span>
</div>
+ <h3>Trying to connect..<input id="loading_chbx" type="checkbox" class="show_next"></input><span>.</span></h3>
</div>
- <h3>Trying to connect..<input id="loading_chbx" type="checkbox" class="show_next"></input><span>.</span></h3>
- </div>
- <button id="settings_but" type="button" style="margin-top: 20px;">Settings</button>_POPUPSCRIPTS_
+ <button id="settings_but" type="button" style="margin-top: 20px;">Settings</button>
+ </div>_POPUPSCRIPTS_
</body>
</html>