brianonn
12/4/2014 - 11:24 PM

Add a "Checkbox" shortcut to Evernote Web Client

Add a "Checkbox" shortcut to Evernote Web Client

// ==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();

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.