[tor-commits] [bridgedb] 04/66: Rename some element IDs in bridges.js

gitolite role git at cupani.torproject.org
Wed Jul 27 18:32:09 UTC 2022


This is an automated email from the git hooks/post-receive script.

meskio pushed a commit to branch main
in repository bridgedb.

commit 874be48a664c31996a1cbcdc47024a08c257d7d6
Author: kez <kez at torproject.org>
AuthorDate: Wed Jan 12 14:54:37 2022 -0800

    Rename some element IDs in bridges.js
    
    The element IDs changed were styled by lego's SCSS. They were changed so
    they didn't conflict with other styles from lego.
---
 bridgedb/distributors/https/templates/assets/js/bridges.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/bridgedb/distributors/https/templates/assets/js/bridges.js b/bridgedb/distributors/https/templates/assets/js/bridges.js
index 6d37ce7..5394260 100644
--- a/bridgedb/distributors/https/templates/assets/js/bridges.js
+++ b/bridgedb/distributors/https/templates/assets/js/bridges.js
@@ -42,9 +42,9 @@ function displayOrHide(element) {
 }
 
 window.onload = function() {
-  var selectBtn = document.getElementById('selectbtn');
+  var selectBtn = document.getElementById('bridgedb-selectbtn');
   if (selectBtn) {
-    document.getElementById('selectbtn').addEventListener('click',
+    selectBtn.addEventListener('click',
       function() {
         selectText('bridgelines');
       }, false);
@@ -62,15 +62,15 @@ window.onload = function() {
       }, false);
   }
 
-  var qrcodeBtn = document.getElementById('qrcodebtn');
+  var qrcodeBtn = document.getElementById('bridgedb-qrcodebtn');
   if (qrcodeBtn) {
-    document.getElementById('qrcodebtn').addEventListener('click',
+    qrcodeBtn.addEventListener('click',
       function() {
         displayOrHide('qrcode');
       }, false);
     // Remove the href attribute that opens the QRCode image as a data: URL if
     // JS is disabled:
-    document.getElementById('qrcodebtn').removeAttribute('href');
+    qrcodeBtn.removeAttribute('href');
   }
 
   var qrModalBtn = document.getElementById('qrcode-modal-btn');

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list