All Projects → style-tools → critical-css-widget

style-tools / critical-css-widget

Licence: other
A browser widget to extract Critical CSS and Full CSS from a page. Can be used via the browser console.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to critical-css-widget

crittr
High performance critical css extraction with a great configuration abilities
Stars: ✭ 39 (+11.43%)
Mutual labels:  extract, critical-css, above-the-fold, critical-path
nuxt-speedkit
nuxt-speedkit will help you to improve the lighthouse performance score (100/100) of your website.
Stars: ✭ 401 (+1045.71%)
Mutual labels:  above-the-fold, critical-rendering-path
crypto-price-widget
Easily track the price of your favorite crypto in an attractive desktop widget
Stars: ✭ 72 (+105.71%)
Mutual labels:  widget
GITGET
GitHub의 Contributions를 iOS의 Widget으로 보여주는 App
Stars: ✭ 101 (+188.57%)
Mutual labels:  widget
uploadcare-rails
Rails wrapper for Uploadcare
Stars: ✭ 48 (+37.14%)
Mutual labels:  widget
extract-email-address
Extracts email address from an arbitrary text input.
Stars: ✭ 45 (+28.57%)
Mutual labels:  extract
ModularPlayers
Modular desktop media widget
Stars: ✭ 28 (-20%)
Mutual labels:  widget
FisherMan
CLI program that collects information from facebook user profiles via Selenium.
Stars: ✭ 117 (+234.29%)
Mutual labels:  extract
nps-widget
Net Promoter Score widget
Stars: ✭ 26 (-25.71%)
Mutual labels:  widget
pixel-widget
Scriptable Widget inspired by Pixel's "At a Glance" widget.
Stars: ✭ 96 (+174.29%)
Mutual labels:  widget
bazaar
思源笔记社区集市。SiYuan community bazaar.
Stars: ✭ 18 (-48.57%)
Mutual labels:  widget
used-styles
📝All the critical styles you've used to render a page.
Stars: ✭ 100 (+185.71%)
Mutual labels:  critical-css
yii-masked-input
Yii Framework Masked input widget Extension
Stars: ✭ 38 (+8.57%)
Mutual labels:  widget
rc-year-calendar
Official React wrapper for the year-calendar widget
Stars: ✭ 27 (-22.86%)
Mutual labels:  widget
github-profile-card
Simple and easy to use widget with your GitHub profile — No dependencies
Stars: ✭ 98 (+180%)
Mutual labels:  widget
menu button
Flutter plugin to display a popup menu button widget with handsome design and easy to use.
Stars: ✭ 64 (+82.86%)
Mutual labels:  widget
yii2-google-analytics
Google Analytics Universal tracking widget.
Stars: ✭ 14 (-60%)
Mutual labels:  widget
lifecycle
Lifecycle support for Flutter widgets.
Stars: ✭ 30 (-14.29%)
Mutual labels:  widget
vue-smart-widget
🗃️Smart widget is a flexible and extensible content container component for Vue2.x / Vue3.x in Next branch.
Stars: ✭ 110 (+214.29%)
Mutual labels:  widget
insta-feed.js
Show your Instagram profile on your website. 🌈
Stars: ✭ 25 (-28.57%)
Mutual labels:  widget

Critical CSS Widget [DEPRECATED]

This widget is deprecated and may not work in newer browsers.

For a free frontend optimization (FEO) widget, see https://style.tools/.

  • critical CSS generator (advanced)
  • unused CSS remover
  • duplicate CSS remover
  • works offline and for pages behind a login, e.g. Google Analytics UI

About

A simple browser widget to extract Critical CSS and Full CSS from a page that can be used via the browser console.

The widget is based on a concept by Paul Kinlan, head of Chrome webdeveloper relations team.

https://gist.github.com/PaulKinlan/6284142

The snippet uses a Chrome innovation called getMatchedCSSRules which is deprecated and will be removed in Chrome 63. The Critical CSS Widget is made cross browser using a polyfill for getMatchedCSSRules.

Usage

Copy & paste the widget javascript code directly in the browser console (F12) and use the following methods with an optional callback to extract critical CSS.

Extract Critical CSS

// file download
critical.extract();

// callback
critical.extract('critical',function(css) {
   console.log('Extracted critical CSS:',css);
});

Extract Full CSS

// file download
critical.extract('full');

// callback
critical.extract('full',function(css) {
   console.log('Extracted Full CSS:',css);
});

Copy & Paste Instant Extract

The following code will instantly start a Critical CSS download after pasting the code into the browser console.

(function(d,c,s) {s=d.createElement('script');s.async=true;s.onload=c;s.src='https://raw.githack.com/style-tools/critical-css-widget/master/critical-css-widget.min.js';d.head.appendChild(s);})(document,function() {
   // critical css file download
   critical.extract();
});

The snippet uses raw.githack.com. You can also directly copy the code from Github and insert it in the browser console:

https://github.com/style-tools/critical-css-widget/blob/master/critical-css-widget.min.js

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].