moved console polyfills to polyfills.js

pull/4/head
Keivan Beigi 11 years ago
parent 2a0090e5ce
commit a715b953cb

@ -1,14 +1,5 @@
'use strict'; 'use strict';
(function () { (function () {
window.console = window.console || {};
window.console.log = window.console.log || function(){};
window.console.group = window.console.group || function(){};
window.console.groupEnd = window.console.groupEnd || function(){};
window.console.debug = window.console.debug || function(){};
window.console.warn = window.console.warn || function(){};
window.console.assert = window.console.assert || function(){};
window.alert = function (message) { window.alert = function (message) {
window.Messenger().post(message); window.Messenger().post(message);
}; };

@ -36,8 +36,7 @@ require.config({
init: function () { init: function () {
require( require(
[ [
'jQuery/ToTheTop', 'jQuery/ToTheTop'
'Instrumentation/ErrorHandler'
]); ]);
} }

@ -63,6 +63,7 @@
<script src="/polyfills.js"></script> <script src="/polyfills.js"></script>
<script src="/JsLibraries/jquery.js"></script> <script src="/JsLibraries/jquery.js"></script>
<script src="/JsLibraries/messenger.js"></script> <script src="/JsLibraries/messenger.js"></script>
<script src="/Instrumentation/ErrorHandler.js"></script>
<script src="/ServerStatus.js"></script> <script src="/ServerStatus.js"></script>
<script data-main="/app" src="/JsLibraries/require.js"></script> <script data-main="/app" src="/JsLibraries/require.js"></script>

@ -1,3 +1,12 @@
window.console = window.console || {};
window.console.log = window.console.log || function(){};
window.console.group = window.console.group || function(){};
window.console.groupEnd = window.console.groupEnd || function(){};
window.console.debug = window.console.debug || function(){};
window.console.warn = window.console.warn || function(){};
window.console.assert = window.console.assert || function(){};
if (!String.prototype.startsWith) { if (!String.prototype.startsWith) {
Object.defineProperty(String.prototype, 'startsWith', { Object.defineProperty(String.prototype, 'startsWith', {
enumerable: false, enumerable: false,
@ -29,4 +38,4 @@ if(!('contains' in String.prototype))
String.prototype.contains = function(str, startIndex) { String.prototype.contains = function(str, startIndex) {
return -1 !== String.prototype.indexOf.call(this, str, startIndex); return -1 !== String.prototype.indexOf.call(this, str, startIndex);
}; };
} }

Loading…
Cancel
Save