aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/options/sendTargets
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-04-12 02:27:39 +0300
committerManeraKai <manerakai@protonmail.com>2022-04-12 02:27:39 +0300
commit5d4377c081d18d89e64184c60d3fa97504768c81 (patch)
treec6dd7c0c79fe68060e1366809443c3d096c11e18 /src/pages/options/sendTargets
parentauto fetch proxitok instances (#185) (diff)
downloadlibredirect-5d4377c081d18d89e64184c60d3fa97504768c81.zip
Restructuring Settings Structure
Diffstat (limited to 'src/pages/options/sendTargets')
-rw-r--r--src/pages/options/sendTargets/sendTargets.html83
-rw-r--r--src/pages/options/sendTargets/sendTargets.js4
2 files changed, 45 insertions, 42 deletions
diff --git a/src/pages/options/sendTargets/sendTargets.html b/src/pages/options/sendTargets/sendTargets.html
index 3a00adf8..7da5d1fa 100644
--- a/src/pages/options/sendTargets/sendTargets.html
+++ b/src/pages/options/sendTargets/sendTargets.html
@@ -143,50 +143,53 @@
</div>
<hr>
-
- <div id="normal">
- <div class="some-block option-block">
- <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
- </div>
- <div class="checklist" id="send-normal-checklist"></div>
- <hr>
- <div class="some-block option-block">
- <h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
- </div>
- <form id="custom-send-normal-instance-form">
+ <div id="send">
+ <div class="normal">
<div class="some-block option-block">
- <input id="send-normal-custom-instance" placeholder="https://send.com" type="url" />
- <button type="submit" class="add" id="send-normal-add-instance">
- <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor">
- <path d="M0 0h24v24H0V0z" fill="none" />
- <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
- </svg>
- </button>
+ <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
</div>
- </form>
- <div class="checklist" id="send-normal-custom-checklist"></div>
- </div>
- <div id="tor">
- <div class="some-block option-block">
- <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
- </div>
- <div class="checklist" id="send-tor-checklist"></div>
- <hr>
- <div class="some-block option-block">
- <h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
+ <div class="checklist checklist"></div>
+ <hr>
+ <div class="some-block option-block">
+ <h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
+ </div>
+ <form class="custom-instance-form">
+ <div class="some-block option-block">
+ <input class="custom-instance" placeholder="https://send.com" type="url" />
+ <button type="submit" class="add add-instance">
+ <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+ fill="currentColor">
+ <path d="M0 0h24v24H0V0z" fill="none" />
+ <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
+ </svg>
+ </button>
+ </div>
+ </form>
+ <div class="checklist custom-checklist"></div>
</div>
- <form id="custom-send-tor-instance-form">
+ <div class="tor">
<div class="some-block option-block">
- <input id="send-tor-custom-instance" placeholder="https://send.com" type="url" />
- <button type="submit" class="add" id="send-tor-add-instance">
- <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor">
- <path d="M0 0h24v24H0V0z" fill="none" />
- <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
- </svg>
- </button>
+ <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
</div>
- </form>
- <div class="checklist" id="send-tor-custom-checklist"></div>
+ <div class="checklist checklist"></div>
+ <hr>
+ <div class="some-block option-block">
+ <h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
+ </div>
+ <form class="custom-instance-form">
+ <div class="some-block option-block">
+ <input class="custom-instance" placeholder="https://send.com" type="url" />
+ <button type="submit" class="add add-instance">
+ <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+ fill="currentColor">
+ <path d="M0 0h24v24H0V0z" fill="none" />
+ <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
+ </svg>
+ </button>
+ </div>
+ </form>
+ <div class="checklist custom-checklist"></div>
+ </div>
</div>
</section>
@@ -196,4 +199,4 @@
<script type="module" src="../../../assets/javascripts/localise.js"></script>
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/src/pages/options/sendTargets/sendTargets.js b/src/pages/options/sendTargets/sendTargets.js
index 0b0a9379..1e39e246 100644
--- a/src/pages/options/sendTargets/sendTargets.js
+++ b/src/pages/options/sendTargets/sendTargets.js
@@ -16,8 +16,8 @@ protocolElement.addEventListener("change",
);
function changeProtocolSettings(protocol) {
- let normalDiv = document.getElementById("normal");
- let torDiv = document.getElementById("tor");
+ let normalDiv = document.getElementsByClassName("normal")[0];
+ let torDiv = document.getElementsByClassName("tor")[0];
if (protocol == 'normal') {
normalDiv.style.display = 'block';
torDiv.style.display = 'none';