Created
August 6, 2012 13:58
-
-
Save yahelc/3274628 to your computer and use it in GitHub Desktop.
Chosen for OpenAir
This file contains hidden or 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 Chosen for OpenAir | |
// @author Yahel Carmon | |
// @description Uses Chosen for Open Air Client Selector. Might break if they change anything. Must set it such that you display ALL CLIENTS in the settings. Use at your own risk. | |
// @namespace https://gist.github.com/gists/blahblah | |
// @match https://www.openair.com/timesheet.pl* | |
// @include https://www.openair.com/timesheet.pl* | |
// ==/UserScript== | |
window.unsafeWindow || ( | |
unsafeWindow = (function() { | |
var el = document.createElement('p'); | |
el.setAttribute('onclick', 'return window;'); | |
return el.onclick(); | |
}()) | |
); | |
(function(jQuery){ | |
var $ = jQuery; | |
$.getScript("//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js", function(){ | |
$ = jQuery = unsafeWindow.jQuery; | |
$("<link>").attr({ | |
type: 'text/css', | |
rel: 'stylesheet', | |
href: "https://www.bluestatedigital.com/page/-/js/analytics/stylesheets/chosen.css" | |
}).appendTo("head"); | |
$.ajax({ | |
cache: true, | |
url: 'https://raw.github.com/harvesthq/chosen/master/chosen/chosen.jquery.js', | |
dataType: "script", | |
success: function() { $("select[id^='customer_project']").chosen(); | |
} | |
}); | |
}); | |
}(unsafeWindow.jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setting the client dropdown to show all is under Personal Settings: http://cl.ly/image/2l3v0M1J2e1D