Evernote direct link opening, without "You are leaving Evernote"

Faster links opening. Git repo at https://gitlab.com/vitaly-zdanevich/evernote-direct-link-opening-without-you-are-leaving

目前为 2024-03-15 提交的版本。查看 最新版本

// ==UserScript==
// @name         Evernote direct link opening, without "You are leaving Evernote"
// @namespace    http://tampermonkey.net/
// @version      1.0
// @author       Vitaly Zdanevich
// @match        https://www.evernote.com/client/web*
// @grant        none
// @description  Faster links opening. Git repo at https://gitlab.com/vitaly-zdanevich/evernote-direct-link-opening-without-you-are-leaving
// @license MIT
// ==/UserScript==

(function() {
    document.addEventListener('click', callback, false);
})()

function callback(e) {
    if (e.target.tagName !== 'A') {
        return;
    }

    e.preventDefault();
    const url = decodeURIComponent(e.target.href.match(/dest=(.*)/)[1])
    window.open(url, '_blank');
}