diff --git a/js/options.js b/js/options.js index 99e878c..dc09b8a 100644 --- a/js/options.js +++ b/js/options.js @@ -4,6 +4,12 @@ let defaultOptions; let options; +function toI18n(str) { + return str.replace(/__MSG_(\w+)__/g, function (match, v1) { + return v1 ? chrome.i18n.getMessage(v1) : ''; + }); +} + // Load options from storage const load = function () { return new Promise(function (resolve) { @@ -96,7 +102,7 @@ const update_context_menu = function (enabled) { } else { chrome.contextMenus.remove('ViewImage-SearchByImage'); } -} +}; // On change, save document.addEventListener('change', event => {