Skip to content

Commit

Permalink
Merge pull request #1298 from greenpeace/no-more-ponyfill
Browse files Browse the repository at this point in the history
PLANET-5850 Remove CSS vars ponyfill
  • Loading branch information
Inwerpsel authored Feb 15, 2021
2 parents 202dc43 + 29d1591 commit e96478b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions assets/src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { setupLoadMore } from './load_more';
import { setupPDFIcon } from './pdf_icon';
import { setupSearch } from './search';
import { setupExternalLinks } from './external_links';
import { setupCSSVarsPonyfill } from './cssvarsponyfill';
import { setupEnhancedDonateButton } from './enhancedDonateButton';

import 'bootstrap';
Expand All @@ -28,6 +27,5 @@ jQuery(function($) {
setupPDFIcon($);
setupSearch($);
setupExternalLinks($);
setupCSSVarsPonyfill();
setupEnhancedDonateButton();
});
4 changes: 0 additions & 4 deletions assets/src/js/cssvarsponyfill.js

This file was deleted.

3 changes: 1 addition & 2 deletions src/MasterSite.php
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,6 @@ public function enqueue_public_assets() {

// JS files.
wp_register_script( 'jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js', [], '3.3.1', true );
wp_register_script( 'cssvarsponyfill', 'https://cdnjs.cloudflare.com/ajax/libs/css-vars-ponyfill/2.3.1/css-vars-ponyfill.min.js', [], '2', false );

// Variables reflected from PHP to the JS side.
$localized_variables = [
Expand All @@ -722,7 +721,7 @@ public function enqueue_public_assets() {
'show_scroll_times' => Search::SHOW_SCROLL_TIMES,
];

wp_register_script( 'main', $this->theme_dir . '/assets/build/index.js', [ 'jquery', 'cssvarsponyfill' ], $js_creation, true );
wp_register_script( 'main', $this->theme_dir . '/assets/build/index.js', [ 'jquery' ], $js_creation, true );
wp_localize_script( 'main', 'localizations', $localized_variables );
wp_enqueue_script( 'main' );
}
Expand Down

0 comments on commit e96478b

Please sign in to comment.