Created
September 8, 2011 12:25
-
-
Save mathiasbynens/1203270 to your computer and use it in GitHub Desktop.
Userscript that enables sensible defaults for jsFiddle.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Sensible defaults for jsFiddle. | |
// @author Mathias Bynens <http://mathiasbynens.be/> | |
// @link http://mths.be/bde | |
// @match http://jsfiddle.net/* | |
// ==/UserScript== | |
// Ignore existing fiddles | |
if (window.location.pathname == '/') { | |
// Insert JS before </body> and don’t use any libraries by default | |
[].forEach.call(document.querySelectorAll('#js_wrap option[value="b"], #js_lib option[value="11"]'), function(el) { | |
el.selected = true; | |
}); | |
// Don’t use the “normalized” CSS (it’s more like a reset anyway) | |
document.getElementById('id_normalize_css').checked = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was asked how to disable the sidebar by default. You could add this to the userscript:
…or just use
unsafeWindow.Layout.sidebar.hide();
(probably combined with theunsafeWindow
polyfill).