Skip to content

Instantly share code, notes, and snippets.

@curtisj44
Last active March 15, 2022 09:04
Show Gist options
  • Save curtisj44/10052727 to your computer and use it in GitHub Desktop.
Save curtisj44/10052727 to your computer and use it in GitHub Desktop.
Pesticide CSS bookmarklet
var link,
id = 'Pesticide';
pesticide = document.getElementById(id);
if (pesticide === null) {
console.log(id + ' added');
link = document.createElement('link');
link.id = id;
link.rel = 'stylesheet';
// Using jsdelivr link since raw CSS from GitHub doesn't seem to work
// (https://raw.githubusercontent.com/mrmrs/pesticide/master/css/pesticide.min.css)
link.href = 'https://cdn.jsdelivr.net/npm/pesticide@1.3.1/css/pesticide.min.css';
document.body.appendChild(link);
} else {
console.log(id + ' removed');
document.body.removeChild(pesticide);
}
@philsmithies
Copy link

philsmithies commented Mar 15, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment