diff options
author | ManeraKai <manerakai@protonmail.com> | 2022-04-12 02:27:39 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2022-04-12 02:27:39 +0300 |
commit | 5d4377c081d18d89e64184c60d3fa97504768c81 (patch) | |
tree | c6dd7c0c79fe68060e1366809443c3d096c11e18 /src/pages/options/peertube | |
parent | auto fetch proxitok instances (#185) (diff) | |
download | libredirect-5d4377c081d18d89e64184c60d3fa97504768c81.zip |
Restructuring Settings Structure
Diffstat (limited to 'src/pages/options/peertube')
-rw-r--r-- | src/pages/options/peertube/peertube.html | 84 | ||||
-rw-r--r-- | src/pages/options/peertube/peertube.js | 4 |
2 files changed, 45 insertions, 43 deletions
diff --git a/src/pages/options/peertube/peertube.html b/src/pages/options/peertube/peertube.html index fb95dd44..c4190498 100644 --- a/src/pages/options/peertube/peertube.html +++ b/src/pages/options/peertube/peertube.html @@ -144,57 +144,59 @@ </div> <hr> - - <div id="normal"> - <div class="some-block option-block"> - <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> - </div> - <div class="checklist" id="simpleertube-normal-checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customInstances__">Custom Instances</h4> - </div> - <form id="custom-simpleertube-normal-instance-form"> + <div id="simpleertube"> + <div class="normal"> <div class="some-block option-block"> - <input id="simpleertube-normal-custom-instance" placeholder="https://simpleertube.com" type="url" /> - <button type="submit" class="add" id="simpleertube-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="simpleertube-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="simpleertube-tor-checklist"></div> - <hr> - <div class="some-block option-block"> - <h4 data-localise="__MSG_customPopup__">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://simpleertube.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-simpleertube-tor-instance-form"> + <div class="tor"> + <div class="some-block option-block"> + <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4> + </div> + <div class="checklist checklist"></div> + <hr> <div class="some-block option-block"> - <input id="simpleertube-tor-custom-instance" placeholder="https://simpleertube.com" type="url" /> - <button type="submit" class="add" id="simpleertube-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_customPopup__">Custom Instances</h4> </div> - </form> - <div class="checklist" id="simpleertube-tor-custom-checklist"></div> + <form class="custom-instance-form"> + <div class="some-block option-block"> + <input class="custom-instance" placeholder="https://simpleertube.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> - <script type="module" src="../init.js"></script> <script type="module" src="./peertube.js"></script> <script type="module" src="../../../assets/javascripts/localise.js"></script> </body> -</html> +</html> \ No newline at end of file diff --git a/src/pages/options/peertube/peertube.js b/src/pages/options/peertube/peertube.js index 7aa0f711..d01a6e08 100644 --- a/src/pages/options/peertube/peertube.js +++ b/src/pages/options/peertube/peertube.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'; |