forked from ilGur1132/smart-https
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.html
More file actions
152 lines (150 loc) · 10.5 KB
/
Copy pathoptions.html
File metadata and controls
152 lines (150 loc) · 10.5 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!--
- Copyright 2021 ilGur Petter
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Options - Smart HTTPS</title>
<link type="text/css" rel="stylesheet" href="options.css">
</head>
<body>
<div class="logo"></div>
<div class="intro">
<details open>
<summary>Info</summary>
<p><b>HTTP</b>, or Hyper-Text Transfer Protocol, is the way a Web server communicates with the browser. HTTP lets visitors view a site and send information back to the Web server. <b>HTTPS</b>, or Hyper-Text Transfer Protocol Secure, is HTTP through a secured connection. Communications through an HTTPS server are encrypted by a secure certificate known as an SSL. The encryption prevents third-parties from eavesdropping on communications to and from the server. Read more about HTTPS at <a target="_blank" href="https://en.wikipedia.org/wiki/HTTPS">this</a> Wikipedia page.</p>
<p><b>Smart HTTPS</b> addon helps you always use the secure HTTPS protocol, if supported by the server. It automatically changes HTTP protocol to the secure HTTPS, and if loading encounters error, reverts it back to HTTP protocol. There are also several options to adjust the performance according to your need (read below).</p>
</details>
</div>
<div id="content">
<details open>
<summary>Settings</summary>
<div class="information">
<i>###</i><p>When switching to HTTPS, if loading takes longer than <input id="timeout" type="number" min=0 max=30000> milliseconds, revert the protocol back to HTTP (default is 3000 ms).</p>
</div>
<div class="information">
<i>###</i><p>When switching to HTTPS, if any resource within the page loads in HTTP, revert the protocol back to HTTP <input id="typemissmatch" type="checkbox"> (default is not active)</p>
<p class="separator"></p>
<p>Please note, once you enable this option, even if the page loads without any error(s) in HTTPS protocol, but during the loading process a resource(s) such as style, script, or image loads in HTTP, the addon will consider this an error and reverts the protocol back to HTTP.</p><br/>
<p><b>Note</b>: this option is still in Beta, so you may encounter errors or performance issues. Please proceed with caution.</p>
</div>
<div class="information">
<i>###</i><p>Log errors and other info to the console <input id="consolelog" type="checkbox"></p>
<p class="separator"></p>
<p>In order to see the console, in Firefox, press (Ctrl + Shift + J) on the main window. In Chrome and Opera, head to extensions page and click on the "background.html" link within the extension info (Inspect views).</p>
</div>
<div class="information">
<i>###</i><p>Print full URL in Whitelist | Blacklist table <input id="fullurl" type="checkbox"></p>
<p class="separator"></p>
<p>If this options is checked, full URL is shown in the whitelist and blacklist tables (i.e. www.test.com (http://www.test.com/pages)).</p>
</div>
<div class="information">
<i>###</i><p>Add <b>Upgrade-Insecure-Requests</b> header to ALL websites with HTTPS protocol <input id="uinsecurer" type="checkbox"></p>
<p class="separator"></p>
<p>Upgrade-Insecure-Requests is a Content Security Policy directive that tells the browser all resources must be accessed via HTTPS.</p>
<p>Once this option is active, HTTP-declared resources will automatically be requested on HTTPS by the browser, without any mixed content alert.</p>
</div>
<div class="information">
<i>###</i><p>Disable whitelisting HTTP protocols (only for domains added automatically) <input id="dwhitelisting" type="checkbox"></p>
<p class="separator"></p>
<p>If you do NOT want the addon to whitelist erroneous HTTP protocols, please enable this option (default is disabled).</p><br/>
<p><b>Note</b>: it is not recommneded to disable whitelisting, because it forces the addon to re-check all erroneous HTTP protocols everytime you load these websites.</p><br/>
<p>This may cause loading a bit slower. Moreover, "Back" & "Forward" buttons may not work properly for some websites. If you see any of these issues, add the website(s) to the whitelist table manually.</p>
</div>
<div class="information">
<i>###</i><p>Enable incognito mode (private browsing) <input id="incognito" type="checkbox"></p>
<p class="separator"></p>
<p>When incognito mode is enabled, Smart HTTPS won't add any domain (with conditions below) to the whitelist table (default is disabled).</p><br/>
<p><b>Note</b>: for this option to take action, a domain should meet two conditions (1) be visited in incognito (private) mode (2) be added automatically by the addon.</p>
</div>
<div class="information">
<i>###</i><p>Enable regular expressions (RegExp) for whitelist and blacklist matching <input id="regexp" type="checkbox"></p>
<p class="separator"></p>
<p>If you want to match whitelist or blacklist items with regular expressions, please check this option.</p><br/>
<p><b>Note</b> 1: add items in the whitelist or blacklist tables in regular expressions format as following. To write Regex please omit the first and last slash chars (/).</p><br/>
<p><b>Example</b>: to have regular expression <b>/(.*)example\.com/</b> please add item <b>(.*)example\.com</b> to the table (without <b>'/'</b> char).</p><br/>
<p><b>Note</b> 2: the addon uses "new RegExp(item)" command to translate any item to regular expressions.</p><br/>
<p><b>Note</b> 3: when RegExp is active, you can still add items in normal format, i.e. <b>www.example.com</b></p><br/>
<p><b>Note</b> 4: if you have a long list of whitelist or blacklist items, do not activate RegExp, as it may hurt performance.</p>
</div>
</details>
<details open>
<summary>Table</summary>
<div class="information">
<i>###</i><p>Table below lists all whitelisted and blacklisted domains. Maximum table size is <input id="max-table-items" type="number" min=0 max=1000> items.</p>
<p class="separator"></p>
<p>Add a desirted domain to the input area and then press + or enter-key to add it to the table.</p>
</div>
<div class="information">
<i>###</i><p>Whitelisted domains: load only in HTTP protocol (domains NOT supporting HTTPS). Smart HTTPS will add domains automatically to this table.</p>
<p class="separator"></p>
<p>You can also add any desired domain manually (if you want to use Regular expressions, please activate RegExp option above).</p><br/>
<p>Please note, if you delete an item from the whitelist table, the addon (Smart HTTPS) will try HTTPS protocol again on the deleted item, and if it fails, the domain will be added to the table again.</p><br/>
<i>###</i><p>Blacklisted domains: load only in HTTPS protocol (domains that will never drop to HTTP, even though they have errors in HTTPS).</p><br/>
<p>Please proceed with caution when adding a domain to the blacklist table. Some websites may have "redirect-to-http-rule", therefore, forcing them to load in HTTPS may cause infinite loop in loading.</p>
</div>
<div class="itemtable">
<table class="fit">
<tr>
<td>
<table class="user-input">
<tr>
<td><input id="add-http-domain" type="text" placeholder="i.e. www.sample-whitelist.com"></td>
<td id="add-http-button" class="add">
<svg width="8" height="8" viewBox="0 0 122.8799 122.8799">
<path d="M 4.9160156 0.27148438 L 4.9160156 4.9433594 L 0.24414062 4.9433594 L 0.24414062 7.0605469 L 4.9160156 7.0605469 L 4.9160156 11.732422 L 7.0332031 11.732422 L 7.0332031 7.0605469 L 11.707031 7.0605469 L 11.707031 4.9433594 L 7.0332031 4.9433594 L 7.0332031 0.27148438 L 4.9160156 0.27148438 z" transform="scale(10.239992)"/>
</svg>
</td>
</tr>
</table>
</td>
<td>
<table class="user-input">
<tr>
<td><input id="add-https-domain" type="text" placeholder="i.e. www.sample-blacklist.com"></td>
<td id="add-https-button" class="add">
<svg width="8" height="8" viewBox="0 0 122.8799 122.8799">
<path d="M 4.9160156 0.27148438 L 4.9160156 4.9433594 L 0.24414062 4.9433594 L 0.24414062 7.0605469 L 4.9160156 7.0605469 L 4.9160156 11.732422 L 7.0332031 11.732422 L 7.0332031 7.0605469 L 11.707031 7.0605469 L 11.707031 4.9433594 L 7.0332031 4.9433594 L 7.0332031 0.27148438 L 4.9160156 0.27148438 z" transform="scale(10.239992)"/>
</svg>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="user-items">
<table class="list" id="http-url-list">
<thead>
<tr>
<td class="number">»</td>
<td class="name">Whitelisted domains (NOT supporting HTTPS protocol)</td>
<td class="remove" title="Remove this item"></td>
</tr>
</thead>
<tbody id="http-url-list-tbody"></tbody>
</table>
</td>
<td class="user-items">
<table class="list" id="https-url-list">
<thead>
<tr>
<td class="number">»</td>
<td class="name">Blacklisted domains (forced to load in HTTPS)</td>
<td class="remove" title="Remove this item"></td>
</tr>
</thead>
<tbody id="https-url-list-tbody"></tbody>
</table>
</td>
</tr>
</table>
</div>
</details>
</div>
<script type="text/javascript" src="options.js"></script>
</body>
</html>