From dba8cc4290faf96a22ec63c2aa4fcab6bf3acc8f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 07:45:22 +0200 Subject: Adding upstream version 7.5.1+dfsg. Signed-off-by: Daniel Baumann --- src/scripts/pattern-help.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/scripts/pattern-help.js (limited to 'src/scripts/pattern-help.js') 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 ----------------- -- cgit v1.2.3