less than 1 minute read

This bookmarklet provides an easy way to test css styles against a website without access to its server by creating a <link/>element in the <head> of the page. It also updates it with a cache-blocking parameter if already exists.

javascript: (function () {
  let cssLink = document.getElementById('injected-css');
  if (cssLink === null) {
    cssLink = document.createElement('link');
    cssLink.id = 'injected-css';
    cssLink.rel = 'stylesheet';
  cssLink.href = 'https://albertoroura.com/style.css?v=' + Date.now();