mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-16 16:19:48 -05:00
Don't bundle polyfills
They are inherently global, so don't belong in the domain of webpack.
This commit is contained in:
parent
b65332c5d4
commit
884e9ff4a7
7 changed files with 37 additions and 36 deletions
5
polyfill/b64.min.js
vendored
5
polyfill/b64.min.js
vendored
|
@ -1,5 +0,0 @@
|
|||
/*!
|
||||
* https://github.com/davidchambers/Base64.js
|
||||
* see https://github.com/davidchambers/Base64.js/blob/master/LICENSE
|
||||
*/
|
||||
!function(){function t(t){this.message=t}var r="undefined"!=typeof exports?exports:this,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",r.btoa||(r.btoa=function(r){for(var o,n,a=String(r),i=0,c=e,d="";a.charAt(0|i)||(c="=",i%1);d+=c.charAt(63&o>>8-i%1*8)){if(n=a.charCodeAt(i+=.75),n>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");o=o<<8|n}return d}),r.atob||(r.atob=function(r){var o=String(r).replace(/=+$/,"");if(o.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,a,i=0,c=0,d="";a=o.charAt(c++);~a&&(n=i%4?64*n+a:a,i++%4)?d+=String.fromCharCode(255&n>>(-2*i&6)):0)a=e.indexOf(a);return d})}();
|
6
polyfill/custom-event.min.js
vendored
6
polyfill/custom-event.min.js
vendored
|
@ -1,6 +0,0 @@
|
|||
/*!
|
||||
* https://github.com/krambuhl/custom-event-polyfill
|
||||
* @license The MIT License (MIT) Copyright (c) 2014 Evan Krambuhl
|
||||
* see https://github.com/krambuhl/custom-event-polyfill/blob/master/LICENSE
|
||||
*/
|
||||
(function(){try{new e("test")}catch(t){var e=function(t,e){var n;return e=e||{bubbles:!1,cancelable:!1,detail:void 0},n=document.createEvent("CustomEvent"),n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n};e.prototype=window.Event.prototype,window.CustomEvent=e}})();
|
12
polyfill/es5-shim.min.js
vendored
12
polyfill/es5-shim.min.js
vendored
File diff suppressed because one or more lines are too long
6
polyfill/match-media.min.js
vendored
6
polyfill/match-media.min.js
vendored
|
@ -1,6 +0,0 @@
|
|||
/*!
|
||||
* https://github.com/paulirish/matchMedia.js
|
||||
* @license Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license
|
||||
* see https://github.com/paulirish/matchMedia.js/blob/master/LICENSE.txt
|
||||
*/
|
||||
(function(){window.matchMedia||(window.matchMedia=function(){"use strict";var e=window.styleMedia||window.media;if(!e){var t=document.createElement("style"),i=document.getElementsByTagName("script")[0],n=null;t.type="text/css",t.id="matchmediajs-test",i.parentNode.insertBefore(t,i),n="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle,e={matchMedium:function(e){var i="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return t.styleSheet?t.styleSheet.cssText=i:t.textContent=i,"1px"===n.width}}}return function(t){return{matches:e.matchMedium(t||"all"),media:t||"all"}}}());})();
|
|
@ -38,6 +38,8 @@
|
|||
};
|
||||
</script>
|
||||
|
||||
<!-- Polyfills -->
|
||||
<script src="/js/polyfill.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
36
polyfill/intl.min.js → static/js/polyfill.min.js
vendored
36
polyfill/intl.min.js → static/js/polyfill.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -36,12 +36,6 @@ VersionPlugin.prototype.apply = function (compiler) {
|
|||
// Prepare all entry points
|
||||
var entry = {
|
||||
common: [
|
||||
// Polyfills
|
||||
'./polyfill/b64.min.js',
|
||||
'./polyfill/custom-event.min.js',
|
||||
'./polyfill/es5-shim.min.js',
|
||||
'./polyfill/intl.min.js',
|
||||
'./polyfill/match-media.min.js',
|
||||
// Vendor
|
||||
'raven-js',
|
||||
'react',
|
||||
|
|
Loading…
Reference in a new issue