Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yahelc/1203401 to your computer and use it in GitHub Desktop.
Save yahelc/1203401 to your computer and use it in GitHub Desktop.
Userscript that enables jQuery-friendly defaults for jsFiddle.
// ==UserScript==
// @name Sensible defaults for jsFiddle.
// @author Mathias Bynens <http://mathiasbynens.be/>
// @modified-by Yahel Carmon
// @link http://mths.be/bde
// @match http://jsfiddle.net/*
// ==/UserScript==
if(window.location.pathname === "/") //only on new Fiddles
{
// Insert JS on DOM Ready and use jQuery Edge
[].forEach.call(document.querySelectorAll('#js_wrap option[value="d"], #js_lib option[value="46"]'), 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