Skip to content

Instantly share code, notes, and snippets.

@joniahola
Last active October 26, 2018 11:40
Show Gist options
  • Save joniahola/154705b104795e41003283744aface59 to your computer and use it in GitHub Desktop.
Save joniahola/154705b104795e41003283744aface59 to your computer and use it in GitHub Desktop.
Reload current page's stylesheets again (obiviosly not inline styles)
Chrome
---
1. Go to chrome://bookmarks/
2. Add new bookmark
3. add this code:
javascript:{let e=(e,t=document)=>Array.from(t.querySelectorAll(e)),t=r=>{for(let t of e('link[rel=stylesheet][href]',r)){let e=new URL(t.href);e.searchParams.set('forceReload',Date.now()),t.href=e}for(let o of e('iframe',r))o.contentDocument&&t(o.contentDocument)};t()}
4. Now you can refresh current page stylesheets!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment