Fix internationalisation in WebExtension

main
Elbert Alias 8 years ago
parent fbfa4dbbb6
commit 04531bdee5

@ -10070,7 +10070,7 @@
"html": "(?:<div[^>]+id=\"recaptcha_image|<link[^>]+recaptcha|document\\.getElementById\\('recaptcha')", "html": "(?:<div[^>]+id=\"recaptcha_image|<link[^>]+recaptcha|document\\.getElementById\\('recaptcha')",
"icon": "reCAPTCHA.png", "icon": "reCAPTCHA.png",
"script": "(?:api-secure\\.recaptcha\\.net|recaptcha_ajax\\.js)", "script": "(?:api-secure\\.recaptcha\\.net|recaptcha_ajax\\.js)",
"website": "http://recaptcha.net" "website": "https://www.google.com/recaptcha/"
}, },
"sIFR": { "sIFR": {
"cats": [ "cats": [
@ -10494,4 +10494,4 @@
"priority": "9" "priority": "9"
} }
} }
} }

@ -1,13 +1,9 @@
/** global: browser */ /** global: browser */
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
var var nodes = document.querySelectorAll('[data-i18n]');
i, value,
nodes = document.querySelector('*');
for ( i = 0; i < nodes.length; i ++ ) { nodes.forEach(function(node) {
if ( value = nodes[i].dataset.i18n ) { node.innerHTML = browser.i18n.getMessage(node.dataset.i18n);
nodes[i].innerHTML = browser.i18n.getMessage(value); });
}
}
}); });

@ -12,7 +12,6 @@
<script src="js/browser-polyfill.js"></script> <script src="js/browser-polyfill.js"></script>
<script src="js/wappalyzer.js"></script> <script src="js/wappalyzer.js"></script>
<script src="js/defaults.js"></script>
<script src="js/options.js"></script> <script src="js/options.js"></script>
<script src="js/i18n.js"></script> <script src="js/i18n.js"></script>
</head> </head>

@ -470,13 +470,6 @@ var wappalyzer = (function() {
regex = /<meta[^>]+>/ig, regex = /<meta[^>]+>/ig,
patterns = parsePatterns(w.apps[app.app].meta); patterns = parsePatterns(w.apps[app.app].meta);
w.log('Function call: analyzeMeta');
if ( app.app === 'CloudCart' ) {
w.log('xxx');
w.log(patterns);
}
if ( patterns ) { if ( patterns ) {
while ( match = regex.exec(html) ) { while ( match = regex.exec(html) ) {
for ( meta in patterns ) { for ( meta in patterns ) {

Loading…
Cancel
Save