summaryrefslogtreecommitdiffstats
path: root/src/scripts/pattern-help.js
blob: c5d7be10f3a09b67cbc733dceaae5df6936ce540 (plain)
1
2
3
4
5
6
7
8
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 -----------------