Skip to content

Instantly share code, notes, and snippets.

@dhilowitz
Forked from dragonfax/README.md
Created February 1, 2017 16:40
Show Gist options
  • Save dhilowitz/bcae92bffe6d220f3622c9fbb6e8230e to your computer and use it in GitHub Desktop.
Save dhilowitz/bcae92bffe6d220f3622c9fbb6e8230e to your computer and use it in GitHub Desktop.
Add a "Checkbox" shortcut to Evernote Web Client

I recently switched from using the Evernote Desktop Client to the web client. The only thing I missed was the short-cut for creating Todo checkboxes.

Here is a quick TamperMonkey (Grease Monkey) script to add that functionality back in. Add the userscript to Tampermonkey.

// ==UserScript==
// @name Checkbox Shortcut
// @namespace http://github.com/dragonfax/
// @version 0.1
// @description Adds a shortcut (ctrl-command-T) to create a checkbox in the note.
// @author Jason Stillwell
// @match https://www.evernote.com/*
// @grant unsafeWindow
// ==/UserScript==
function TM_Retry() {
window.setTimeout(TM_Wait,100);
}
function TM_Wait() {
if(typeof unsafeWindow.jQuery == 'undefined') {
TM_Retry();
return;
}
var $ = unsafeWindow.jQuery;
var ifr = $("iframe[id^=entinymce_]");
if(ifr.size() == 0) {
TM_Retry();
return;
}
ifr.contents().keydown(function(evt){
if (evt.keyCode==84 && evt.metaKey && evt.ctrlKey){
evt.preventDefault();
$('#gwt-debug-EditorSidebarView-root>div>div:first-child>div>div:nth-child(3)')[0].click();
}
});
}
TM_Wait();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment