Setup modules, Gruntfile, File Structure, etc

This commit is contained in:
Mahdi Dibaiee
2015-08-30 15:48:25 +04:30
parent 94e867874b
commit 86113d017d
22 changed files with 25150 additions and 60 deletions
+29
View File
@@ -0,0 +1,29 @@
// DOMContentLoaded is fired once the document has been loaded and parsed,
// but without waiting for other external resources to load (css/images/etc)
// That makes the app more responsive and perceived as faster.
// https://developer.mozilla.org/Web/Reference/Events/DOMContentLoaded
window.addEventListener('DOMContentLoaded', function() {
// We'll ask the browser to use strict code to help us catch errors earlier.
// https://developer.mozilla.org/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode
'use strict';
var translate = navigator.mozL10n.get;
// We want to wait until the localisations library has loaded all the strings.
// So we'll tell it to let us know once it's ready.
navigator.mozL10n.once(start);
// ---
function start() {
var message = document.getElementById('message');
// We're using textContent because inserting content from external sources into your page using innerHTML can be dangerous.
// https://developer.mozilla.org/Web/API/Element.innerHTML#Security_considerations
message.textContent = translate('message');
}
});
File diff suppressed because it is too large Load Diff