зеркало из https://github.com/mozilla/buddyup.git
Merge pull request #176 from mythmon/csp
[Bug 1195792] Move loading translations out of an inline script, to make CSP happy.
This commit is contained in:
Коммит
42b12bfa97
|
@ -57,12 +57,7 @@
|
|||
</main>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
var url = 'translations/' + navigator.language + '.js';
|
||||
// I'm sorry.
|
||||
document.write('<script src="' + url + '"><' + '/script>');
|
||||
</script>
|
||||
|
||||
<script src="js/load_translations.js"></script>
|
||||
<script src="js/settings.js"></script>
|
||||
<script src="js/libs/lodash.custom.min.js"></script>
|
||||
<script src="js/libs/async_storage.js"></script>
|
||||
|
|
|
@ -41,11 +41,7 @@
|
|||
</main>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
var url = 'translations/' + navigator.language + '.js';
|
||||
// I'm sorry.
|
||||
document.write('<script src="' + url + '"><' + '/script>');
|
||||
</script>
|
||||
<script src="js/load_translations.js"></script>
|
||||
|
||||
<script src="js/settings.js"></script>
|
||||
<script src="js/libs/async_storage.js"></script>
|
||||
|
|
|
@ -23,15 +23,6 @@
|
|||
<!-- localization -->
|
||||
<link rel="prefetch" type="application/l10n" href="data/locales.ini" />
|
||||
<link rel="prefetch" type="application/l10n" href="data/date/date.ini" />
|
||||
|
||||
<script>
|
||||
var url = 'translations/' + navigator.language + '.js';
|
||||
// I'm sorry.
|
||||
document.write('<script src="' + url + '"><' + '/script>');
|
||||
</script>
|
||||
|
||||
<script src="js/libs/l10n.js" defer></script>
|
||||
<script src="js/libs/l10n_date.js" defer></script>
|
||||
</head>
|
||||
<body class="skin-organic">
|
||||
<section role="region" class="vbox fit">
|
||||
|
@ -72,12 +63,7 @@
|
|||
</main>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
var url = 'translations/' + navigator.language + '.js';
|
||||
// I'm sorry.
|
||||
document.write('<script src="' + url + '"><' + '/script>');
|
||||
</script>
|
||||
|
||||
<script src="js/load_translations.js"></script>
|
||||
<script src="js/settings.js"></script>
|
||||
<script src="js/libs/lodash.custom.min.js"></script>
|
||||
<script src="js/libs/async_storage.js"></script>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
console.log('l10n.js loaded');
|
||||
'use strict';
|
||||
|
||||
(function() {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
(function() {
|
||||
var url = 'translations/' + navigator.language + '.js';
|
||||
// I'm sorry.
|
||||
document.write('<script src="' + url + '"><' + '/script>');
|
||||
})();
|
|
@ -58,12 +58,7 @@
|
|||
</main>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
var url = 'translations/' + navigator.language + '.js';
|
||||
// I'm sorry.
|
||||
document.write('<script src="' + url + '"><' + '/script>');
|
||||
</script>
|
||||
|
||||
<script src="js/load_translations.js"></script>
|
||||
<script src="js/settings.js"></script>
|
||||
<script src="js/libs/lodash.custom.min.js"></script>
|
||||
<script src="js/libs/async_storage.js"></script>
|
||||
|
|
|
@ -42,11 +42,7 @@
|
|||
<main id="my-profile" class="fit scroll"></main>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
var url = 'translations/' + navigator.language + '.js';
|
||||
// I'm sorry.
|
||||
document.write('<script src="' + url + '"><' + '/script>');
|
||||
</script>
|
||||
<script src="js/load_translations.js"></script>
|
||||
|
||||
<script src="js/settings.js"></script>
|
||||
<script src="js/libs/lodash.custom.min.js"></script>
|
||||
|
|
|
@ -95,12 +95,7 @@
|
|||
</menu>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
var url = 'translations/' + navigator.language + '.js';
|
||||
// I'm sorry.
|
||||
document.write('<script src="' + url + '"><' + '/script>');
|
||||
</script>
|
||||
|
||||
<script src="js/load_translations.js"></script>
|
||||
<script src="js/settings.js"></script>
|
||||
<script src="js/libs/async_storage.js" defer></script>
|
||||
<script src="js/libs/nunjucks-slim.js" defer></script>
|
||||
|
|
|
@ -41,12 +41,7 @@
|
|||
</main>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
var url = 'translations/' + navigator.language + '.js';
|
||||
// I'm sorry.
|
||||
document.write('<script src="' + url + '"><' + '/script>');
|
||||
</script>
|
||||
|
||||
<script src="js/load_translations.js"></script>
|
||||
<script src="js/settings.js"></script>
|
||||
<script src="js/libs/lodash.custom.min.js"></script>
|
||||
<script src="js/libs/async_storage.js" defer></script>
|
||||
|
|
|
@ -75,12 +75,7 @@
|
|||
</main>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
var url = 'translations/' + navigator.language + '.js';
|
||||
// I'm sorry.
|
||||
document.write('<script src="' + url + '"><' + '/script>');
|
||||
</script>
|
||||
|
||||
<script src="js/load_translations.js"></script>
|
||||
<script src="js/settings.js"></script>
|
||||
<script src="js/libs/lodash.custom.min.js"></script>
|
||||
<script src="js/libs/async_storage.js" defer></script>
|
||||
|
|
|
@ -58,12 +58,7 @@
|
|||
</main>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
var url = 'translations/' + navigator.language + '.js';
|
||||
// I'm sorry.
|
||||
document.write('<script src="' + url + '"><' + '/script>');
|
||||
</script>
|
||||
|
||||
<script src="js/load_translations.js"></script>
|
||||
<script src="js/settings.js"></script>
|
||||
<script src="js/libs/async_storage.js"></script>
|
||||
<script src="js/libs/lodash.custom.min.js"></script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче