aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/options/general
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-02-06 05:58:42 +0300
committerManeraKai <manerakai@protonmail.com>2022-02-06 05:58:42 +0300
commit2876cb24b34e18470c297043c56e915aae2cea7c (patch)
tree6b3fbd29963e64451a40be22f74f1ddda21b1b3c /src/pages/options/general
parentreadded default and custom instances. Needs some work (diff)
downloadlibredirect-2876cb24b34e18470c297043c56e915aae2cea7c.zip
Cleaning code
Diffstat (limited to 'src/pages/options/general')
-rw-r--r--src/pages/options/general/general.html59
-rw-r--r--src/pages/options/general/general.js25
2 files changed, 0 insertions, 84 deletions
diff --git a/src/pages/options/general/general.html b/src/pages/options/general/general.html
index 3a7e8cf2..92cd48c5 100644
--- a/src/pages/options/general/general.html
+++ b/src/pages/options/general/general.html
@@ -38,65 +38,6 @@
<span>Update Instances</span>
</a>
</div>
- <!-- <hr> -->
- <!-- <section class="settings-block">
- <p data-localise="__MSG_exceptionsDescriptionP1__">
- Enter a URL or Regular Expression to be excluded from redirects.
- </p>
- <p data-localise="__MSG_exceptionsDescriptionP2__">
- All requests for or initiating from a URL that matches your exception
- will be excluded from redirects.
- </p>
- <p data-localise="__MSG_exceptionsDescriptionP3__">
- Note - Supports JavaScript regular expressions, excluding the
- enclosing forward slashes.
- </p>
- </section>
- <section class="settings-block">
- <table class="exceptions option">
- <tbody>
- <tr>
- <td>
- <h1 data-localise="__MSG_addException__">Add Exception</h1>
- </td>
- </tr>
- <tr>
- <td>
- <input id="new-exceptions-item" type="text" placeholder="URL or RegExp" />
- </td>
- <td>
- <input type="radio" id="url" name="type" value="URL" checked />
- <label class="radio" for="url">URL</label>
- <input type="radio" id="regExp" name="type" value="RegExp" />
- <label class="radio" for="regExp">RegExp</label>
- </td>
- <td>
- <button id="add-to-exceptions">
- <svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
- <line x1="256" y1="112" x2="256" y2="400" style="
- fill: none;
- stroke: #fff;
- stroke-linecap: round;
- stroke-linejoin: round;
- stroke-width: 32px;
- " />
- <line x1="400" y1="256" x2="112" y2="256" style="
- fill: none;
- stroke: #fff;
- stroke-linecap: round;
- stroke-linejoin: round;
- stroke-width: 32px;
- " />
- </svg>
- </button>
- </td>
- </tr>
- </tbody>
- </table>
- </section>
- <ul id="exceptions-items"></ul>
- </section> -->
-
<script type="module" src="../init.js"></script>
<script type="module" src="./general.js"></script>
diff --git a/src/pages/options/general/general.js b/src/pages/options/general/general.js
index 23c739aa..17b7a843 100644
--- a/src/pages/options/general/general.js
+++ b/src/pages/options/general/general.js
@@ -47,31 +47,6 @@ browser.storage.sync.get(
}
);
-// function addToExceptions() {
-// const input = document.getElementById("new-exceptions-item");
-// const type = document.querySelector('input[name="type"]:checked').value;
-// if (input.value) {
-// try {
-// let value = input.value;
-// new RegExp(input.value);
-// if (type === "URL")
-// value = value.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
-
-// exceptions.push(value);
-// browser.storage.sync.set({
-// exceptions: exceptions,
-// });
-// prependExceptionsItem(value, exceptions.indexOf(value));
-// input.value = "";
-// } catch (error) {
-// input.setCustomValidity("Invalid RegExp");
-// }
-// } else {
-// input.setCustomValidity("Invalid RegExp");
-// }
-// }
-// document.getElementById("add-to-exceptions").addEventListener("click", addToExceptions);
-
themeElement.addEventListener("change", (event) => {
const value = event.target.options[theme.selectedIndex].value;
switch (value) {