Load babel-polyfill only when necessary.

This commit is contained in:
Christoph Wiechert
2017-07-18 15:44:29 +02:00
parent 8e075597f4
commit 7d0f328427
11 changed files with 49 additions and 4 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

10
public/assets/polyfill.js Normal file
View File

@@ -0,0 +1,10 @@
// stupid old browsers
if(typeof Promise === 'undefined') {
(function(d, script) {
script = d.createElement('script');
script.type = 'text/javascript';
script.async = false;
script.src = '/assets/babel-polyfill.js';
d.getElementsByTagName('head')[0].appendChild(script);
}(document));
}

View File

@@ -56,6 +56,7 @@ td.file-icon {
}
h1 .fa-icon {
height: 50px;
width: 50px;
vertical-align: middle;
}
.btn .fa-icon.fa-fw {

View File

@@ -7,6 +7,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<link href="/assets/styles.css" rel="stylesheet">
<script>
if(typeof Promise === 'undefined') {
(function(d, script) {
script = d.createElement('script');
script.type = 'text/javascript';
script.async = false;
script.src = '/assets/babel-polyfill.js';
d.getElementsByTagName('head')[0].appendChild(script);
}(document));
}
</script>
</head>
<body>

View File

@@ -7,6 +7,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<link href="/assets/styles.css" rel="stylesheet">
<script>
if(typeof Promise === 'undefined') {
(function(d, script) {
script = d.createElement('script');
script.type = 'text/javascript';
script.async = false;
script.src = '/assets/babel-polyfill.js';
d.getElementsByTagName('head')[0].appendChild(script);
}(document));
}
</script>
</head>
<body>

View File

@@ -6,7 +6,7 @@
<link href="/assets/favicon.ico" rel="icon" type="image/x-icon"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link href="/assets/styles.css" rel="stylesheet">
<style>
html {
position: relative;

View File

@@ -7,6 +7,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<link href="/assets/styles.css" rel="stylesheet">
<script>
if(typeof Promise === 'undefined') {
(function(d, script) {
script = d.createElement('script');
script.type = 'text/javascript';
script.async = false;
script.src = '/assets/babel-polyfill.js';
d.getElementsByTagName('head')[0].appendChild(script);
}(document));
}
</script>
</head>
<body>