diff --git a/CHANGELOG.md b/CHANGELOG.md index 28c50ad..5b1c82b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,15 @@ ## 2.9.0 -- Preserve background transparency #117 -- New [CSS parser](https://github.com/tbela99/css) #67 +- New [CSS parser](https://github.com/tbela99/css) and minifier #67 +- Resize background images in inline css #116 +- Preserve background transparency when resizing #117 +- \[bug\] Fix an issue with responsive images #95 +- \[bug\] PWA start_url missing from preloaded urls #113 +- \[bug\] Cannot download sourcemap file #112 +- \[bug\] fix an error in the service worker #104 +- Convert CSS inline images to webp #93 +- Parse and minify inline CSS attribute #105 ## 2.8.1 diff --git a/ROADMAP.md b/ROADMAP.md index 3f89a74..39b0832 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -4,30 +4,29 @@ 1. implement backgroundFetch API 2. make the custom pwa prompt optional and configurable. the user may choose to use the browser defaults. -3. font-display css property is set only when parse critical css is enabled. it should be set independantly -4. merge javascript and css files using groups in order to leverage cache. for example we can merge common libraries in one bundle and other files which depend on the current page in another bundle -5. implement new manifest file [properties](https://developer.mozilla.org/en-US/docs/Web/Manifest) -6. customize image quality settings (jpeg image quality, jpeg optimization method) -7. improved LQIP for [jpeg files](https://www.smashingmagazine.com/2019/08/faster-image-loading-embedded-previews/) -8. better detect character encoding when manually editing the offline page HTML -9. modify service worker cache and network fallback and cache only to attempt an update after a specified time (it will behave like cache and network update with a delayed update) -10. [bug] When fetch remote scripts is off and a local copy is hosted locally, the local copy should not be used -11. [feature] Validate integrity data when the integrity attribute is provided for link and script before minifying / merging them together -12. Implement manual dns prefetch? -13. add support for the user action Log see [here](https://docs.joomla.org/J1.x:User_Action_Logs) -14. do not cache partial request? -15. intercept partial requests and return response from cache? -16. merge multiple google font < link > tag? -17. Fetch remote resources periodically (configurable) (css, javascript, fonts, ...). This can be usefull for analytic scripts and and hosted fonts. -18. Web push notifications with firebase? -19. prerender images using primitive.js svg generation [https://github.com/ondras/primitive.js/blob/master/js/app.js](https://github.com/ondras/primitive.js/blob/master/js/app.js) -20. Messaging API (broadcasting messages to and from all/single clients) -21. Remove < Link rel=preload > http header and use < link > HTML tag instead. see [here](https://jakearchibald.com/2017/h2-push-tougher-than-i-thought/) -22. CSS: deduplicate, merge properties, rewrite rules, etc -23. Disk quota management see [here](https://developer.chrome.com/apps/offline_storage) and [here](https://developer.mozilla.org/fr/docs/Web/API/API_IndexedDB/Browser_storage_limits_and_eviction_criteria) and [here](https://gist.github.com/ebidel/188a513b1cd5e77d4d1453a4b6d060b0) -24. Clear Site Data api see [here](https://www.w1.org/TR/clear-site-data/) -25. code refactoring: make helper properties protected or private and use wrapper methods instead -26. Implement expiring urls? +3. merge javascript and css files using groups in order to leverage cache. for example we can merge common libraries in one bundle and other files which depend on the current page in another bundle +4. implement new manifest file [properties](https://developer.mozilla.org/en-US/docs/Web/Manifest) +5. customize image quality settings (jpeg image quality, jpeg optimization method) +6. improved LQIP for [jpeg files](https://www.smashingmagazine.com/2019/08/faster-image-loading-embedded-previews/) +7. better detect character encoding when manually editing the offline page HTML +8. modify service worker cache and network fallback and cache only to attempt an update after a specified time (it will behave like cache and network update with a delayed update) +9. [bug] When fetch remote scripts is off and a local copy is hosted locally, the local copy should not be used +10. [feature] Validate integrity data when the integrity attribute is provided for link and script before minifying / merging them together +11. Implement manual dns prefetch? +12. add support for the user action Log see [here](https://docs.joomla.org/J1.x:User_Action_Logs) +13. do not cache partial request? +14. intercept partial requests and return response from cache? +15. merge multiple google font < link > tag? +16. Fetch remote resources periodically (configurable) (css, javascript, fonts, ...). This can be usefull for analytic scripts and and hosted fonts. +17. Web push notifications with firebase? +18. prerender images using primitive.js svg generation [https://github.com/ondras/primitive.js/blob/master/js/app.js](https://github.com/ondras/primitive.js/blob/master/js/app.js) +19. Messaging API (broadcasting messages to and from all/single clients) +20. Remove < Link rel=preload > http header and use < link > HTML tag instead. see [here](https://jakearchibald.com/2017/h2-push-tougher-than-i-thought/) +21. CSS: deduplicate, merge properties, rewrite rules, etc +22. Disk quota management see [here](https://developer.chrome.com/apps/offline_storage) and [here](https://developer.mozilla.org/fr/docs/Web/API/API_IndexedDB/Browser_storage_limits_and_eviction_criteria) and [here](https://gist.github.com/ebidel/188a513b1cd5e77d4d1453a4b6d060b0) +23. Clear Site Data api see [here](https://www.w1.org/TR/clear-site-data/) +24. code refactoring: make helper properties protected or private and use wrapper methods instead +25. Implement expiring urls? ## Low priority list diff --git a/bgstyles.es6 b/bgstyles.es6 index 0915025..16123ab 100644 --- a/bgstyles.es6 +++ b/bgstyles.es6 @@ -105,6 +105,6 @@ LIB.ready(function (undef) { } window.addEventListener('resize', updateBgStyle, false); - setTimeout(updateBgStyle, 10); + setTimeout(updateBgStyle, 25); } }); \ No newline at end of file diff --git a/bgstyles.js b/bgstyles.js index 67ba7ec..9310541 100644 --- a/bgstyles.js +++ b/bgstyles.js @@ -43,6 +43,6 @@ LIB.ready((function(e) { })); })), o.sort((function(e, t) { return t - e; - })), window.addEventListener("resize", n, !1), setTimeout(n, 10); + })), window.addEventListener("resize", n, !1), setTimeout(n, 25); } })); \ No newline at end of file diff --git a/bgstyles.min.js b/bgstyles.min.js index ad2b8dd..af62e91 100644 --- a/bgstyles.min.js +++ b/bgstyles.min.js @@ -1 +1 @@ -LIB.ready((function(e){const t=[].slice.apply(document.querySelectorAll("[data-bg-style]"));if(t.length>0){const c=t.map((function(e){return JSON.parse(e.dataset.bgStyle)}));let o=[];function n(){let i,a,r,u,l,d=o.length;for(d=t.length;d--;){for(a=t[d],r=Object.keys(c[d]),l=e,u=0;u0&&o.height>0?s():"decode"in o?o.decode().then(s):o.onload=s}}Object.values(c).forEach((function(e){Object.keys(e).forEach((function(e){e=+e,-1==o.indexOf(e)&&o.push(e)}))})),o.sort((function(e,t){return t-e})),window.addEventListener("resize",n,!1),setTimeout(n,10)}})); \ No newline at end of file +LIB.ready((function(e){const t=[].slice.apply(document.querySelectorAll("[data-bg-style]"));if(t.length>0){const c=t.map((function(e){return JSON.parse(e.dataset.bgStyle)}));let o=[];function n(){let i,a,r,u,l,d=o.length;for(d=t.length;d--;){for(a=t[d],r=Object.keys(c[d]),l=e,u=0;u0&&o.height>0?s():"decode"in o?o.decode().then(s):o.onload=s}}Object.values(c).forEach((function(e){Object.keys(e).forEach((function(e){e=+e,-1==o.indexOf(e)&&o.push(e)}))})),o.sort((function(e,t){return t-e})),window.addEventListener("resize",n,!1),setTimeout(n,25)}})); \ No newline at end of file diff --git a/docs/css.md b/docs/css.md index 433737c..cf0e213 100644 --- a/docs/css.md +++ b/docs/css.md @@ -10,32 +10,77 @@ Configure CSS settings. Enable or disable CSS processing -### Font Display - -Set font-display css property. It requires Parse Critical CSS settings must be enabled - ### Fetch Remotely Hosted CSS Fetch CSS files hosted on remote servers. -### Ignored CSS files +## CSS Optimization Settings -If you want to exclude a css file from processing add a pattern that match that file here. +### Load CSS Async -### Removed CSS Files +Asynchronously load css so that page rendering is not blocked while css files are loading. CSS files will be moved at the bottom of the page. We should configure critical css in order to avoid FOUC -Remove a css file from the page. Any file that matches the pattern provided is removed from the page +### Minify CSS -## CSS Optimization Settings +Enable or disable merging css files together -### Minify CSS +### Merge CSS Enable or disable merging css files together -### Load CSS Async +### Parse Inline CSS Attribute -Asynchronously load css so that page rendering is not blocked while css files are loading. CSS files will be moved at the bottom of the page. We should configure critical css in order to avoid FOUC +Parse CSS defined in HTML 'style' attribute -### Merge CSS +## CSS Parser Options + +### Parse Import Rule + +Enable or disable @import processing + +### Allow Duplicate Rules + +Enable or disable duplicate rules. This does not apply to @font-face + +### Allow Duplicate Declarations + +Enable or disable duplicate declarations in the same rule + +## CSS Rendering Options + +### CSS Level + +The CSS Level specification used to render colors + +### Convert Colors + +Convert CSS colors to the format selected. The value NONE means no color conversion will be made + +### Remove Comments + +Enable or disable CSS comments removal + +### Remove Empty Rules + +Enable or disable empty rules removal + +## Web Fonts Settings + +### Preload Web Fonts + +Enable or disable web fonts preloading + +### Font Display + +Set font-display css property. + +## Misc + +### Ignored CSS files + +Ignore css files that match the specified pattern + +### Removed CSS Files + +Remove css files that match the specified pattern -Enable or disable merging css files together diff --git a/docs/images.md b/docs/images.md index 6e0abd2..f86efa3 100644 --- a/docs/images.md +++ b/docs/images.md @@ -40,6 +40,10 @@ Firefox will send this header Accept: image/webp,*/* ``` +### Convert Inline Background + +Convert background images defined in HTML 'style' attribute + ### Crop Method Algorithm used when resizing images. Values are: diff --git a/gzip.xml b/gzip.xml index 24256db..9bf1321 100644 --- a/gzip.xml +++ b/gzip.xml @@ -1,861 +1,862 @@ - - - plg_system_gzip - Thierry Bela - August 2016 - Copyright (C) 2005 - 2016 Thierry Bela. - Released under dual license LGPL v3 | MIT - contact@tbela.net - https://tbela.net - 2.8.1 - PLG_SYSTEM_GZIP_XML_DESCRIPTION - - docs - css - fields - helpers - js/lib - js/dist - lib - language - worker/dist - worker/css - docs/ - push - vendor - autoload.php - responder.php - helper.php - cacert.pem - bgstyles.js - bgstyles.min.js - loader.js - loader.min.js - imagesloader.js - imagesloader.min.js - worker_version - CHANGELOG.md - LICENSE.md - README.md - gzip.php - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JOPTION_MAX_FILE_SIZE_B - JOPTION_MAX_FILE_SIZE_KB - JOPTION_MAX_FILE_SIZE_MB - JOPTION_MAX_FILE_SIZE_GB - - - JOPTION_MAX_FILE_SIZE_B - JOPTION_MAX_FILE_SIZE_KB - JOPTION_MAX_FILE_SIZE_MB - JOPTION_MAX_FILE_SIZE_GB - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - JOPTION_MAX_FILE_SIZE_B - JOPTION_MAX_FILE_SIZE_KB - JOPTION_MAX_FILE_SIZE_MB - JOPTION_MAX_FILE_SIZE_GB - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - https://raw.githubusercontent.com/tbela99/gzip/master/gzip.xml - + + + plg_system_gzip + Thierry Bela + August 2016 + Copyright (C) 2005 - 2016 Thierry Bela. + Released under dual license LGPL v3 | MIT + contact@tbela.net + https://tbela.net + 2.8.1 + PLG_SYSTEM_GZIP_XML_DESCRIPTION + + docs + css + fields + helpers + js/lib + js/dist + lib + language + worker/dist + worker/css + docs/ + push + vendor + autoload.php + responder.php + helper.php + cacert.pem + bgstyles.js + bgstyles.min.js + loader.js + loader.min.js + imagesloader.js + imagesloader.min.js + worker_version + CHANGELOG.md + LICENSE.md + README.md + gzip.php + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JOPTION_MAX_FILE_SIZE_B + JOPTION_MAX_FILE_SIZE_KB + JOPTION_MAX_FILE_SIZE_MB + JOPTION_MAX_FILE_SIZE_GB + + + JOPTION_MAX_FILE_SIZE_B + JOPTION_MAX_FILE_SIZE_KB + JOPTION_MAX_FILE_SIZE_MB + JOPTION_MAX_FILE_SIZE_GB + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + JOPTION_MAX_FILE_SIZE_B + JOPTION_MAX_FILE_SIZE_KB + JOPTION_MAX_FILE_SIZE_MB + JOPTION_MAX_FILE_SIZE_GB + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + https://raw.githubusercontent.com/tbela99/gzip/master/gzip.xml +
\ No newline at end of file diff --git a/language/en-GB/en-GB.plg_system_gzip.ini b/language/en-GB/en-GB.plg_system_gzip.ini index fd5b474..e71e153 100644 --- a/language/en-GB/en-GB.plg_system_gzip.ini +++ b/language/en-GB/en-GB.plg_system_gzip.ini @@ -176,7 +176,7 @@ PLG_GZIP_FIELD_MERGECSS_DESCRIPTION="" PLG_GZIP_FIELD_PARSE_INLINE_CSS_LABEL="Parse Inline CSS Attribute" PLG_GZIP_FIELD_PARSE_INLINE_CSS_DESCRIPTION="" -PLG_GZIP_FIELD_FONT_REPLOAD_LABEL="Preload Web Font" +PLG_GZIP_FIELD_FONT_REPLOAD_LABEL="Preload Web Fonts" PLG_GZIP_FIELD_FONT_REPLOAD_DESCRIPTION="" PLG_GZIP_FIELD_CSS_PARSER_PARSE_IMPORT_LABEL="Parse Import Rules" @@ -194,6 +194,12 @@ PLG_GZIP_FIELD_CSS_RENDERING_CSS_LEVEL_DESCRIPTION="Render Colors Using Css4 Syn PLG_GZIP_FIELD_CSS_RENDERING_CONVERT_COLOR_LABEL="Convert Colors" PLG_GZIP_FIELD_CSS_RENDERING_CONVERT_COLOR_DESCRIPTION="Convert colors to the selected format" +PLG_GZIP_FIELD_CSS_RENDERING_REMOVE_COMMENTS_LABEL="Remove Comments" +PLG_GZIP_FIELD_CSS_RENDERING_REMOVE_COMMENTS_DESCRIPTION="" + +PLG_GZIP_FIELD_CSS_RENDERING_REMOVE_EMPTY_NODES_LABEL="Remove Empty Rules" +PLG_GZIP_FIELD_CSS_RENDERING_REMOVE_EMPTY_NODES_DESCRIPTION="" + PLG_GZIP_FIELD_CSS_RENDERING_CONVERT_COLOR_OPTION_HEX="HEX" PLG_GZIP_FIELD_CSS_RENDERING_CONVERT_COLOR_OPTION_RGBA="RGBA" PLG_GZIP_FIELD_CSS_RENDERING_CONVERT_COLOR_OPTION_HSL="HSL" diff --git a/worker/dist/browser.administrator.js b/worker/dist/browser.administrator.js index f98f0d9..fcf9bae 100644 --- a/worker/dist/browser.administrator.js +++ b/worker/dist/browser.administrator.js @@ -11,7 +11,7 @@ // @ts-check -// build d6b059a 2021-01-31 01:12:51-05:00 +// build ac3d844 2021-02-07 11:00:41-05:00 if ("serviceWorker" in navigator) { navigator.serviceWorker. diff --git a/worker/dist/browser.js b/worker/dist/browser.js index e7d57e2..f4df288 100644 --- a/worker/dist/browser.js +++ b/worker/dist/browser.js @@ -11,7 +11,7 @@ // @ts-check -// build d6b059a 2021-01-31 01:12:51-05:00 +// build ac3d844 2021-02-07 11:00:41-05:00 if ("serviceWorker" in navigator) { navigator.serviceWorker. diff --git a/worker/dist/browser.uninstall.js b/worker/dist/browser.uninstall.js index b2fdf27..35b82e3 100644 --- a/worker/dist/browser.uninstall.js +++ b/worker/dist/browser.uninstall.js @@ -10,7 +10,7 @@ */ // @ts-check -// build d6b059a 2021-01-31 01:12:51-05:00 +// build ac3d844 2021-02-07 11:00:41-05:00 if ("serviceWorker" in navigator && navigator.serviceWorker.controller) { navigator.serviceWorker.getRegistration().then(function (registration) { diff --git a/worker/dist/serviceworker.js b/worker/dist/serviceworker.js index f4df264..03ada82 100644 --- a/worker/dist/serviceworker.js +++ b/worker/dist/serviceworker.js @@ -881,14 +881,14 @@ * service worker build id */ buildid: { - value: "d6b059a", + value: "ac3d844", enumerable: true }, /** * service worker buid date */ builddate: { - value: "2021-01-31 01:12:51-05:00", + value: "2021-02-07 11:00:41-05:00", enumerable: true }, /** diff --git a/worker_version b/worker_version index 7a91a12..b537717 100644 --- a/worker_version +++ b/worker_version @@ -1 +1 @@ -679e5c7928b09bcb92aad194f05f040729c1950b +fcb6d2563285fd1a88d25ad15f3130a87c17e327