summaryrefslogtreecommitdiff
path: root/html/popup.html
blob: ad6c258f86166edeeebcc16fd1d1571c05fb6bfe (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<!--
    SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0

    Show details of how Haketilo handled given page and allow querying
    repositories for custom scripts.

    This file is part of Haketilo.

    Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>

    File is dual-licensed. You can choose either GPLv3+, CC BY-SA or both.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

    I, Wojtek Kosior, thereby promise not to sue for violation of this file's
    licenses. Although I request that you do not make use of this code in a
    proprietary program, I am not going to enforce this in court.
  -->
<html>
  <head>
    <meta charset="utf-8"/>
    <title>Haketilo popup</title>
#LOADCSS html/reset.css
#LOADCSS html/base.css
#LOADCSS html/grid.css
    <style>
#IF TEST
      html {
          background-color: #444;
      }
#ENDIF

      html, body {
	  width: 400px;
	  overflow-x: hidden;
	  overflow-y: auto;
      }

      #page_info_container {
	  padding: 0.4em;
      }

      #info_form, #unprivileged_page_info {
	  display: grid;
	  grid-template-columns: auto;
	  text-align: center;
      }

      #info_form * {
	  white-space: nowrap;
	  text-overflow: ellipsis;
	  overflow-x: hidden;
      }

      #info_form label {
	  padding-bottom: 0.2em;
      }
      #info_form label+span, .top_but_container {
	  padding-bottom: 0.5em;
      }
    </style>
  </head>
  <body>
    <!-- It contains just templates, we can include it at the top -->
#INCLUDE html/repo_query.html
    <div id="page_info_container">
      <div id="loading_info">
	Loading page info...
      </div>
      <div id="info_form" class="hide">
	<label>Page URL:</label>
	<span id="page_url"></span>
	<label id="privileged_page_info" class="hide">Privileged page</label>
	<div id="unprivileged_page_info" class="hide">
	  <label>Scripts blocked:</label>
	  <span id="scripts_blocked"></span>
	  <label>Injected payload:</label>
	  <span id="injected_payload"></span>
	  <label>Mapping used:</label>
	  <span id="mapping_used"></span>
	</div>
      </div>
      <div class="text_center top_but_container">
	<button id="search_resources_but" class="hide">
	  Search for custom resources
	</button>
      </div>
      <div class="text_center">
	<button id="settings_but">
	  Open settings
	</button>
      </div>
    </div>
    <div id="repo_query_container" class="hide">
      <!-- Repo query view will be dynamically inserted here. -->
    </div>
#LOADJS html/popup.js
  </body>
</html>