Created
July 20, 2015 15:52
-
-
Save hobbes3/1ee298800041042c64dc to your computer and use it in GitHub Desktop.
OpenAir expenses
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 openair unsuck | |
// @version 0.1 | |
// @author [email protected] (revised by [email protected]) | |
// @description makes openair interaction better, by filling out "defaults". Tampermonkey chrome plugin script. | |
// @namespace https://www.openair.com | |
// @include https://www.openair.com/envelope.pl*action=edit_ticket* | |
// @require http://code.jquery.com/jquery-latest.js | |
// ==/UserScript== | |
var defaultSettings = { | |
"department": { id: '#custom_59', val: "Sales : Prof Svcs" }, | |
"attendee": { id: 'textarea[name="custom_37"]', val: "Satoshi" }, | |
"notes": { id: 'textarea[name="notes"]', val: "New expense policy" } | |
} | |
$(document).ready(function() { | |
for (setting in defaultSettings) { | |
$(defaultSettings[setting].id).val(function() { | |
var v = $(this).val(); | |
return v === "" || v === "__BLANK" ? defaultSettings[setting].val : v; | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment