diff options
Diffstat (limited to 'src/assets')
-rw-r--r-- | src/assets/images/libredirect.svg | 2 | ||||
-rw-r--r-- | src/assets/javascripts/localise.js | 34 | ||||
-rw-r--r-- | src/assets/javascripts/utils.js | 8 |
3 files changed, 1 insertions, 43 deletions
diff --git a/src/assets/images/libredirect.svg b/src/assets/images/libredirect.svg index ad616dd3..a9d63d95 100644 --- a/src/assets/images/libredirect.svg +++ b/src/assets/images/libredirect.svg @@ -1 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 333.369 333.369"><g><path d="M166.684 0c-3.524 0-7.047 1.35-9.748 4.051L4.051 156.935a13.76 13.76 0 0 0 0 19.5l152.885 152.883a13.757 13.757 0 0 0 19.498 0l152.884-152.884a13.76 13.76 0 0 0 0-19.499L176.434 4.051A13.75 13.75 0 0 0 166.684 0" style="fill:#000;fill-opacity:1;stroke-width:10.6446;stroke-linejoin:bevel;paint-order:stroke markers fill;stop-color:#000"/><path d="M166.684 0c-3.524 0-7.047 1.35-9.748 4.051L4.051 156.935a13.76 13.76 0 0 0 0 19.5l152.885 152.883a13.757 13.757 0 0 0 19.498 0l152.884-152.884a13.76 13.76 0 0 0 0-19.499L176.434 4.051A13.75 13.75 0 0 0 166.684 0m0 10.72a12.86 12.86 0 0 1 9.123 3.79L318.86 157.562a12.873 12.873 0 0 1 0 18.245L175.807 318.86a12.873 12.873 0 0 1-18.245 0L14.51 175.807a12.873 12.873 0 0 1 0-18.245L157.562 14.51a12.86 12.86 0 0 1 9.122-3.79" style="fill:#fbc118;fill-opacity:1;stroke-width:10.6446;stroke-linejoin:bevel;paint-order:stroke markers fill;stop-color:#000"/><rect width="211.979" height="211.979" x="-105.99" y="129.738" ry="11.989" style="fill:#fbc117;fill-opacity:1;stroke-width:9.25578;stroke-linejoin:bevel;paint-order:stroke markers fill;stop-color:#000" transform="rotate(-45)"/><path d="M184.948 150.313c-47.943 20.638-46.951 86.743-46.951 86.743h-33.492s-.437-96.715 73.158-116.434c-6.913-13.854-10.362-19.427-5.933-21.62 5.935-2.94 68.022 11.716 70.346 20.393 2.286 8.528-46.827 53.143-53.656 53.143-5.852 0-4.229-7.023-3.472-22.225z" style="fill:#000;fill-opacity:1;stroke-width:11.7733;stroke-linejoin:bevel;paint-order:stroke markers fill;stop-color:#000"/></g></svg> +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 333.369 333.369"><path d="M166.684 0a13.74 13.74 0 0 0-9.748 4.051L4.051 156.935a13.76 13.76 0 0 0 0 19.5l152.885 152.883a13.757 13.757 0 0 0 19.498 0l152.884-152.884a13.76 13.76 0 0 0 0-19.499L176.434 4.051A13.75 13.75 0 0 0 166.684 0"/><path fill="#fbc118" d="M166.684 0a13.74 13.74 0 0 0-9.748 4.051L4.051 156.935a13.76 13.76 0 0 0 0 19.5l152.885 152.883a13.757 13.757 0 0 0 19.498 0l152.884-152.884a13.76 13.76 0 0 0 0-19.499L176.434 4.051A13.75 13.75 0 0 0 166.684 0m0 10.72a12.86 12.86 0 0 1 9.123 3.79L318.86 157.562a12.873 12.873 0 0 1 0 18.245L175.807 318.86a12.873 12.873 0 0 1-18.245 0L14.51 175.807a12.873 12.873 0 0 1 0-18.245L157.562 14.51a12.86 12.86 0 0 1 9.122-3.79"/><rect width="211.979" height="211.979" x="-105.99" y="129.738" fill="#fbc117" ry="11.989" transform="rotate(-45)"/><path d="M184.948 150.313c-47.943 20.638-46.951 86.743-46.951 86.743h-33.492s-.437-96.715 73.158-116.434c-6.913-13.854-10.362-19.427-5.933-21.62 5.935-2.94 68.022 11.716 70.346 20.393 2.286 8.528-46.827 53.143-53.656 53.143-5.852 0-4.229-7.023-3.472-22.225"/></svg> \ No newline at end of file diff --git a/src/assets/javascripts/localise.js b/src/assets/javascripts/localise.js deleted file mode 100644 index d26d07d4..00000000 --- a/src/assets/javascripts/localise.js +++ /dev/null @@ -1,34 +0,0 @@ -window.browser = window.browser || window.chrome - -function localisePage() { - /** - * @param {string} tag - */ - function getMessage(tag) { - return tag.replace(/__MSG_(\w+)__/g, (_match, v1) => { - return v1 ? browser.i18n.getMessage(v1) : null - }) - } - - const elements = document.querySelectorAll("[data-localise]") - for (let i in elements) - if (elements.hasOwnProperty(i)) { - const obj = elements[i] - const tag = obj.getAttribute("data-localise").toString() - const msg = getMessage(tag) - if (msg && msg !== tag) obj.textContent = msg - } - - const placeholders = document.querySelectorAll("[data-localise-placeholder]") - for (let i in placeholders) - if (placeholders.hasOwnProperty(i)) { - const obj = placeholders[i] - const tag = obj.getAttribute("data-localise-placeholder").toString() - const msg = getMessage(tag) - if (msg && msg !== tag) obj.placeholder = msg - } -} - -export default { - localisePage, -} diff --git a/src/assets/javascripts/utils.js b/src/assets/javascripts/utils.js index 439826dd..18168e90 100644 --- a/src/assets/javascripts/utils.js +++ b/src/assets/javascripts/utils.js @@ -21,13 +21,6 @@ function getNextInstance(currentInstanceUrl, instances) { } /** - * @param {string} str - */ -function camelCase(str) { - return str.charAt(0).toUpperCase() + str.slice(1) -} - -/** * @param {URL} url */ function protocolHost(url) { @@ -178,7 +171,6 @@ export default { protocolHost, getList, getBlacklist, - camelCase, getConfig, getOptions, getPingCache, |