summaryrefslogtreecommitdiffstats
path: root/src/scripts/pattern-help.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 05:45:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 05:45:22 +0000
commitdba8cc4290faf96a22ec63c2aa4fcab6bf3acc8f (patch)
tree30de89024109eff10978e6b95ebd9b403a3e37b7 /src/scripts/pattern-help.js
parentInitial commit. (diff)
downloadfoxyproxy-firefox-extension-dba8cc4290faf96a22ec63c2aa4fcab6bf3acc8f.tar.xz
foxyproxy-firefox-extension-dba8cc4290faf96a22ec63c2aa4fcab6bf3acc8f.zip
Adding upstream version 7.5.1+dfsg.upstream/7.5.1+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/scripts/pattern-help.js')
-rw-r--r--src/scripts/pattern-help.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/scripts/pattern-help.js b/src/scripts/pattern-help.js
new file mode 100644
index 0000000..c5d7be1
--- /dev/null
+++ b/src/scripts/pattern-help.js
@@ -0,0 +1,9 @@
+'use strict';
+
+// ----------------- Internationalization ------------------
+document.querySelectorAll('[data-i18n]').forEach(node => {
+ let [text, attr] = node.dataset.i18n.split('|');
+ text = chrome.i18n.getMessage(text);
+ attr ? node[attr] = text : node.appendChild(document.createTextNode(text));
+});
+// ----------------- /Internationalization -----------------