The capo.js snippet is a small script that you can manually run in DevTools. The output is written to the console and includes validation warnings, the actual
<head> order, and the sorted
Here’s how to install the snippet to Chrome DevTools:
Open DevTools and navigate to the Snippets view of the Sources panel
Select ＋ New Snippet, name it
capo.js, and paste the script
To run the snippet:
- Press the ▷ button
- Press Cmd+Enter
Navigate to the Console panel to view the results.
Bookmarklets are tiny scripts that you can execute as if you were opening a bookmarked page. To set it up for capo.js:
Use a tool like this one to create the bookmarklet
Drag the link to your bookmarks bar and click it to execute on any web page
To run the bookmarklet, just click it like a normal bookmark.
Open DevTools and navigate to the Console panel to view the results.
You can customize how capo.js behaves by setting a global config object. See the Configuration guide for more.