Skip to content

Instantly share code, notes, and snippets.

@arshaver
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arshaver/9999759 to your computer and use it in GitHub Desktop.
Save arshaver/9999759 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Splitwise keybindings
// @version 0.1
// @description adds two keybindings to splitwise
// @match https://secure.splitwise.com
// @require http://cdn.craig.is/js/mousetrap/mousetrap.min.js
// @downloadURL https://gist.githubusercontent.com/arshaver/9999759/raw/
// ==/UserScript==
Mousetrap.bind('b', function(e, combo) {
console.log("keypress '" + combo + "' registered")
$("a[href='#add_bill']").click();
});
Mousetrap.bind('s', function(e, combo) {
console.log("keypress '" + combo + "' registered")
$("a[href='#settle_up_form']").click();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment