mirror of
https://github.com/iv-org/invidious.git
synced 2025-07-27 07:48:29 +00:00
Add Polyfills for improved IE support
This commit is contained in:
parent
5787c0b02f
commit
3b31d4881a
2
assets/js/polyfills/UrlPolyfill.js
Normal file
2
assets/js/polyfills/UrlPolyfill.js
Normal file
File diff suppressed because one or more lines are too long
23
assets/js/polyfills/locationOriginPolyfill.js
Normal file
23
assets/js/polyfills/locationOriginPolyfill.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*! (C) 2014 - 2015 Shinnosuke Watanabe - Mit Style License */
|
||||||
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
var loc, value;
|
||||||
|
|
||||||
|
loc = window.location;
|
||||||
|
|
||||||
|
if (loc.origin) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
value = loc.protocol + '//' + loc.hostname + (loc.port ? ':' + loc.port : '');
|
||||||
|
|
||||||
|
try {
|
||||||
|
Object.defineProperty(loc, 'origin', {
|
||||||
|
value: value,
|
||||||
|
enumerable: true
|
||||||
|
});
|
||||||
|
} catch (_error) {
|
||||||
|
loc.origin = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}).call(this);
|
@ -11,6 +11,8 @@
|
|||||||
<link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>">
|
<link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>">
|
||||||
<link rel="stylesheet" href="/css/embed.css?v=<%= ASSET_COMMIT %>">
|
<link rel="stylesheet" href="/css/embed.css?v=<%= ASSET_COMMIT %>">
|
||||||
<title><%= HTML.escape(video.title) %> - Invidious</title>
|
<title><%= HTML.escape(video.title) %> - Invidious</title>
|
||||||
|
<script src="/js/polyfills/UrlPolyfill.js?v=<%= ASSET_COMMIT %>"></script>
|
||||||
|
<script src="/js/polyfills/locationOriginPolyfill.js?v=<%= ASSET_COMMIT %>"></script>
|
||||||
<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script>
|
<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -302,6 +302,29 @@
|
|||||||
<a href="/js/watch.js?v=<%= ASSET_COMMIT %>"><%= translate(locale, "source") %></a>
|
<a href="/js/watch.js?v=<%= ASSET_COMMIT %>"><%= translate(locale, "source") %></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="/js/polyfills/UrlPolyfill.js?v=<%= ASSET_COMMIT %>">UrlPolyfill.js</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://choosealicense.com/licenses/mit">Expat</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/lifaon74/url-polyfill"><%= translate(locale, "source") %></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="/js/polyfills/locationOriginPolyfill.js?v=<%= ASSET_COMMIT %>">locationOriginPolyfill.js</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://choosealicense.com/licenses/mit">Expat</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/shinnn/location-origin.js"><%= translate(locale, "source") %></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
<link rel="stylesheet" href="/css/grids-responsive-min.css?v=<%= ASSET_COMMIT %>">
|
<link rel="stylesheet" href="/css/grids-responsive-min.css?v=<%= ASSET_COMMIT %>">
|
||||||
<link rel="stylesheet" href="/css/ionicons.min.css?v=<%= ASSET_COMMIT %>">
|
<link rel="stylesheet" href="/css/ionicons.min.css?v=<%= ASSET_COMMIT %>">
|
||||||
<link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>">
|
<link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>">
|
||||||
|
<script src="/js/polyfills/UrlPolyfill.js?v=<%= ASSET_COMMIT %>"></script>
|
||||||
|
<script src="/js/polyfills/locationOriginPolyfill.js?v=<%= ASSET_COMMIT %>"></script>
|
||||||
<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script>
|
<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user