Removes unused selectors from all stylesheets on a page and combines the result into a single stylesheet that can be downloaded
This extension removes unused CSS rules on a page by creating a new CSS stylesheet containing only those selectors in use. This not only tidies and optimizes your stylesheets but combines them into a single file which can then be downloaded. The approach used by the extension is based on eliminating all ID and class based selectors that reference IDs and classes not on the page. There is also a quick view dialog that will give the user information on a page about the number of used and unused selectors. There is also now a report on the unused selectors which can be used to verify that the extension is working as described.
There is an issue reported in a review that the extension opens links to other websites. I can't see how this can be possible. The extension gets a list of stylesheets. This list is a property of the webpage document object. It then trys to open each stylesheet. If the stylesheet is on another domain, then nothing will be returned. In this way the extension cannot open any page on another domain. There is development code to get around this problem, but it is not yet active.
The "WebKitBlobBuilder" issue has now been solved. This rendered the extension unusable - thus all the negative feedback. Sorry that I couldn't fix the problem earlier as I was unfortunately sick for a long while. The "WebKitBlobBuilder" error was due to a change (quite reasonable) in chrome to remove support for the "WebKitBlobBuilder" property in favour of the standard "BlobBuilder".
Please let me know if the extension is working as advertised. You can contact me through the normal extension feedback system or at [email protected]
0.2.0.0: Added Unused Selector Report
0.1.2.0: Multiple window issue fixed
0.1.1.0: 'WebKitBlobBuilder' issue fixed
Issues:
1: Stylesheets on a different domain report no selectors. Message will print out saying no selectors found. Under development.
2: Ajax or JavaScript added elements not accounted for. Under development
3: Media queries not respected.
Latest reviews
- (2023-05-17) Vladan Colovic: Not working
- (2022-06-07) Jason C: does not work download button is a no-op; show unused throws some error about a null title.
- (2022-05-23) Hao Wang: 这插件没人维护了?老是报错: SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules各位有没有同类型插件推荐?
- (2021-04-23) Matt Fletcher: findElements: TypeError: items[i].className.split is not a function
- (2020-10-22) Ilya Zhulin: Выдает alert с ошибкой. Не работает.
- (2020-03-07) Глеб Михайлов (Глебушка): Не работает. Нужно доработать.
- (2019-01-28) Raul Peixoto: findElements: TypeError: items[i].className.split is not a function
- (2018-12-18) Liuer Hei: findElements: TypeError: items[i].className.split is not a function !It not works
- (2018-06-30) Alexander Poroshin: It doesn't work for local web-page, e.g. file:///C:/site/W/ind.html. IMHO, to check, remove and combine CSS's a man should create a newpage on a hosting and copy code out there. Or the help file to describe how to use the ext should be enabled.
- (2018-03-16) Pix Tweaks: didn't work on various sites
- (2018-01-27) M Ashraful Islam: I think this is very good one.This is what I needed actually. Thanks
- (2018-01-18) ImImam King: not working
- (2017-11-29) Serhii Seletskyi: great tool, thank you
- (2017-11-27) Jan Zahradnik: Bien pero hay que eliminar del código malicioso que genera para meter su publicidad y sitios pornograficos entre el css que te da :)
- (2017-11-10) Don E.: Unfortunately if you have a responsive site, your CSS will be mostly destroyed and your page will render incorrectly. I bet it works great on older pages or non-responsive pages though.
- (2017-10-29) Clown-Girls Аниматоры: Does not fit for responsive design. Read only one page.
- (2017-10-19) Anton Siniakevich: not working
- (2017-09-05) Nick M: I have Bitdefender antivirus installed and it put in my css the style for their browser Antiphishing tool: #tf_hui_container
- (2017-07-18) Mahmoud Mourad: findElements: TypeError: items[i].className.split is not a function
- (2017-05-22) Nina Cording: Aborts with an error message: items[i].className.split is not a function
- (2017-04-30) Fabio Fontes: Não funciona
- (2017-04-04) ericneo2: Download button did nothing. Report button opens a new tab and returns the error "setPage: TypeError: Cannot read property 'title' of null" The html page I used it on certainly has a title.
- (2017-02-12) b42: Doesn't work. Only JS errors.
- (2017-01-18) WiLine Networks: Doesn't work, only generates an error log message nothing else.
- (2016-11-18) chill side (chillside): Забыли про @keyframes и @media и просто их вычищают.. просто убивает всю анимацию и адаптив на сайте. Не советую.
- (2016-11-02) Carlos Eli Escobar Ruiz: Solo checa css de una sola página, no puedes revisar varias páginas del mismo sitio para de ahi hacer la optimización
- (2016-10-12) Myke Black: didnt work at all in windows 10 chrome version 53
- (2016-09-06) Franck Ze: Inutile
- (2016-09-02) Petersen Design Studios: works like a charm, thank you! ! ! ! ! !
- (2016-07-29) Joel Polsky: This is horrible!! It removes all media queries and comments in the css file and combines into one huge file. This should as least respect the queries and only remove the actual items that are not used.
- (2016-07-16) I tried it on a couple of websites. Unfortunately, the combine CSS created did not work :(