Skip to content

Instantly share code, notes, and snippets.

@IUnknown68
Last active August 29, 2015 14:22
Show Gist options
  • Save IUnknown68/71795ecc1f96bc97ed74 to your computer and use it in GitHub Desktop.
Save IUnknown68/71795ecc1f96bc97ed74 to your computer and use it in GitHub Desktop.
Bookmark for showing inline JS. Copy the last line of `ShowScripts.js` (without `// `) as content into a new bookmark in your browser. Then in any page click the bookmark. Does not work when the content policy forbids foreign css.
script:not([src]) {
background: #ffffe0 none repeat scroll 0 0;
border: 1px dotted grey;
color: black;
display: block;
font-family: monospace;
font-size: 11px;
height: auto;
line-height: 12px;
min-width: 100px;
white-space: pre;
}
(function(){
var el = document.createElement('link');
el.rel="stylesheet";
el.type="text/css";
el.href="http://www.seiberspace.de/media/show-scripts.css";
document.head.appendChild(el);
})();
// for pasting into bookmarks:
// javascript:(function(){var%20el%20=%20document.createElement('link');el.rel="stylesheet";el.type="text/css";el.href="http://www.seiberspace.de/media/show-scripts.css";document.head.appendChild(el);})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment