Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Additional Podio Keyboard Shortcuts
- // @namespace http://www.schreibkraft.biz/
- // @version 0.3
- // @description Adds: ⌥N for new entry, ⌥S to trigger save button
- // @match https://podio.com/*
- // @copyright 2014+, Bernhard Uellenberg
- // ==/UserScript==
- //
- function doc_keyUp(e) {
- // alert(e.keyCode);
- // U can use e.metaKey or e.ctrlKey, depending which key should be pressed the same time
- if (e.altKey) {
- switch (e.keyCode) {
- case 78:
- // N
- if(document.location.href.match(/\/apps\/.+s/)) {
- document.location.href = document.location.href + '/items/new';
- }
- break;
- case 83:
- // S
- $('.save').trigger('click');
- break;
- default:
- break;
- }
- }
- }
- document.addEventListener('keyup', doc_keyUp, false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement