Skip to content

Commit

Permalink
Restore polyfill.io via cdnjs alternative
Browse files Browse the repository at this point in the history
  • Loading branch information
SeinopSys committed Jun 26, 2024
1 parent 6e20d13 commit 147edf5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ PHP-rendered classic web app powering the MLP Vector Club's website since 2015.
[FileSaver.js](https://github.com/eligrey/FileSaver.js),
[paste.js](https://github.com/layerssss/paste.js),
[Draggable](https://github.com/Shopify/Draggable),
[cuid](https://github.com/ericelliott/cuid)
[cuid](https://github.com/ericelliott/cuid),
[Polyfill.io (cdnjs)](https://cdnjs.cloudflare.com/polyfill/)
- Back-end:
[moment.php](https://github.com/fightbulc/moment.php),
[PostgresDb](https://github.com/SeinopSys/PHP-PostgreSQL-Database-Class),
Expand Down
2 changes: 1 addition & 1 deletion app/CoreUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public static function roleGate(string $role = 'developer') {
'websocket',
];
public const DEFAULT_LIBS = [
// 'polyfill-io',
'polyfill-io',
'dragscroll',
'jquery',
'moment',
Expand Down
2 changes: 1 addition & 1 deletion app/LibHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class LibHelper {
'moment' => self::TYPE_JS,
'no-ui-slider' => self::TYPE_JS_CSS,
'paste' => self::TYPE_JS,
// 'polyfill-io' => self::TYPE_JS,
'polyfill-io' => self::TYPE_JS,
'react' => self::TYPE_JS,
'sortable' => self::TYPE_JS,
'typicons' => self::TYPE_CSS,
Expand Down
2 changes: 1 addition & 1 deletion templates/layout/js_libs/_polyfill-io.html.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{% set features = ['IntersectionObserver','HTMLCanvasElement.prototype.toBlob'] %}
{% set min = env('PRODUCTION') ? '.min' : '' %}
<script src="https://polyfill.io/v2/polyfill{{ min }}.js?features={{ features | join(',') }}"></script>
<script src="https://cdnjs.cloudflare.com/polyfill/v2/polyfill{{ min }}.js?features={{ features | join(',') }}"></script>

0 comments on commit 147edf5

Please sign in to comment.