Skip to content

Commit

Permalink
Removed dependency from polyfill[.]io (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
shinsenter committed Jun 28, 2024
1 parent a2e8584 commit ac73cca
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
hostname: defer-wp-test
depends_on:
- mariadb
image: shinsenter/wordpress:php${PHP_VERSION:-7.4}
image: shinsenter/wordpress:php${PHP_VERSION:-8.3}
ports:
- "8000:80"
volumes:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ This plugin also works perfectly on popular browsers, including Internet Explore

## Support my activities

If you find these images useful, consider donating via [PayPal](https://www.paypal.me/shinsenter) or open an issue on [Github](https://github.com/shinsenter/defer-wordpress/issues/new).
If you find this plugin useful, consider donating via [PayPal](https://www.paypal.me/shinsenter) or open an issue on [Github](https://github.com/shinsenter/defer-wordpress/issues/new).

Your support helps keep these images maintained and improved for the community.
Your support helps keep this plugin maintained and improved for the community.

---

Expand Down
8 changes: 5 additions & 3 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
=== A faster website! (aka defer.js) ===
Contributors: shinsenter
Donate link: https://www.paypal.me/shinsenter
Tags: lazyload,lazy-load,defer.js,core-web-vitals,pagespeed,page-speed,html-minify
Tags: lazyload,optimize,pagespeed,performance,defer.js
Requires at least: 4.0
Tested up to: 6.4
Stable tag: 2.9.0
Tested up to: 6.6
Stable tag: 2.10.0
Requires PHP: 5.6
License: GPLv2 or later
License URI: https://code.shin.company/defer-wordpress/blob/master/LICENSE
Expand Down Expand Up @@ -161,6 +161,8 @@ We also recommend using it in conjunction with a page-caching plugin for the ult

== Changelog ==

2.10: Removed dependency from polyfill[.]io

2.9: Fixed broken feeds and API responses

2.8: Updated Defer.js version
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.9.0
2.10.0
15 changes: 4 additions & 11 deletions defer-wordpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Plugin Name: A faster website! (aka defer.js)
* Plugin URI: https://wordpress.org/plugins/shins-pageload-magic/
* Description: 💯 Latest web technologies in website optimization by experienced web experts. 🔰 Very easy to use.
* Version: 2.9.0
* Version: 2.10.0
* Author: Mai Nhut Tan
* Author URI: https://code.shin.company/
* License: GPL-2.0+
Expand All @@ -44,7 +44,7 @@
if (!defined('DEFER_WP_PLUGIN_VERSION')) {
define('DEFER_WP_PLUGIN_BASE', plugin_basename(__FILE__));
define('DEFER_WP_PLUGIN_NAME', 'defer-wordpress');
define('DEFER_WP_PLUGIN_VERSION', '2.9.0');
define('DEFER_WP_PLUGIN_VERSION', '2.10.0');
define('DEFER_WP_PLUGIN_PREFIX', DEFER_WP_PLUGIN_NAME . '_');

define('DEFER_WP_PLUGIN_HOOK', 'plugin_action_links_' . DEFER_WP_PLUGIN_BASE);
Expand All @@ -55,15 +55,8 @@
define('DEFER_WP_CACHE_DIR', __DIR__ . '/cache');
define('DEFER_WP_CACHE_EXP', 600);

$has_deferjs = file_exists(__DIR__ . '/public/lib/defer_plus.min.js');
define('DEFER_WP_SRC_DEFERJS_CDN', $has_deferjs
? __DIR__ . '/public/lib/defer_plus.min.js'
: 'https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@3.7.0/dist/defer_plus.min.js');

$has_polyfill = file_exists(__DIR__ . '/public/lib/polyfill.min.js');
define('DEFER_WP_SRC_POLYFILL_CDN', $has_polyfill
? plugin_dir_url(__FILE__) . 'public/lib/polyfill.min.js'
: 'https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver');
define('DEFER_WP_SRC_DEFERJS_CDN', __DIR__ . '/public/lib/defer_plus.min.js');
define('DEFER_WP_SRC_POLYFILL_CDN', plugin_dir_url(__FILE__) . 'public/lib/polyfill.min.js');

define('DEFER_WP_HOMEPAGE', 'https://shinsenter.github.io/defer.js');
define('DEFER_WP_PLUGIN_URL', 'https://wordpress.org/plugins/shins-pageload-magic/');
Expand Down
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Mai Nhut Tan <shin@shin.company>",
"license": "GPL-2.0",
"dependencies": {
"@shinsenter/defer.js": "^3.7.0"
"@shinsenter/defer.js": "^3.8.0"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit ac73cca

Please sign in to comment.