mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
Add window.Intl polyfill. Resolves GH-96
This commit is contained in:
parent
737a53294d
commit
d86703e5db
4 changed files with 722 additions and 6 deletions
|
@ -35,7 +35,6 @@
|
||||||
"classnames": "2.1.3",
|
"classnames": "2.1.3",
|
||||||
"cookie": "0.2.2",
|
"cookie": "0.2.2",
|
||||||
"css-loader": "0.17.0",
|
"css-loader": "0.17.0",
|
||||||
"custom-event-polyfill": "0.2.1",
|
|
||||||
"eslint": "1.3.1",
|
"eslint": "1.3.1",
|
||||||
"eslint-plugin-react": "3.3.1",
|
"eslint-plugin-react": "3.3.1",
|
||||||
"exenv": "1.2.0",
|
"exenv": "1.2.0",
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
<link rel="shortcut icon" href="/favicon.ico" />
|
<link rel="shortcut icon" href="/favicon.ico" />
|
||||||
<link rel="stylesheet" href="/css/lib/normalize.min.css" />
|
<link rel="stylesheet" href="/css/lib/normalize.min.css" />
|
||||||
|
|
||||||
<!-- Shim/Sham ES5 polyfill for older browsers -->
|
<!-- Polyfill -->
|
||||||
<script src="/js/lib/polyfill.min.js"></script>
|
<script src="/js/lib/polyfill.min.js"></script>
|
||||||
|
|
||||||
<!-- Initialize (Locale & Session) -->
|
<!-- Initialize (Session & Localization) -->
|
||||||
<script src="/js/init.bundle.js"></script>
|
<script src="/js/init.bundle.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
13
src/init.js
13
src/init.js
|
@ -3,9 +3,12 @@ var jar = require('./lib/jar');
|
||||||
|
|
||||||
var translations = require('../locales/translations.json');
|
var translations = require('../locales/translations.json');
|
||||||
|
|
||||||
require('custom-event-polyfill');
|
/**
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
* Session
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
// Session
|
|
||||||
(function () {
|
(function () {
|
||||||
window._session = {};
|
window._session = {};
|
||||||
|
|
||||||
|
@ -46,7 +49,11 @@ require('custom-event-polyfill');
|
||||||
window.refreshSession();
|
window.refreshSession();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// L10N
|
/**
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
* L10N
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
(function () {
|
(function () {
|
||||||
/**
|
/**
|
||||||
* Bind locale code from cookie if available. Uses navigator language API as a fallback.
|
* Bind locale code from cookie if available. Uses navigator language API as a fallback.
|
||||||
|
|
710
static/js/lib/polyfill.min.js
vendored
710
static/js/lib/polyfill.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue