Evernote Web in-app note link

This scripts shows the internal "evernote:///" URI of a note

目前為 2015-04-26 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name		Evernote Web in-app note link
// @namespace	http://andrealazzarotto.com/
// @version		1.0
// @description	This scripts shows the internal "evernote:///" URI of a note
// @match		http://www.evernote.com/view/notebook/*
// @match		https://www.evernote.com/view/notebook/*
// @copyright	2015, Andrea Lazzarotto
// @license		GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @require		http://code.jquery.com/jquery-latest.min.js
// ==/UserScript==

var placeURI = function(url) {
	var selector = $("div[style*='relative'] > div > input[role='presentation']").parent()
	if(!selector.length)
		return false;
	
	selector.before("<p id='noteURI'>Note link: <a href='" + url + "'>" + url + "</a></p>");
	$("#noteURI").css({
		'font-size': '1.1rem',
		'margin-bottom': '.8rem'
	});
	$("#noteURI a").css({
		'font-family': 'monospace',
		'font-size': '1.3rem'
	});
	return true;
}

$(document).ready(function() {
	if(!ENNote)
		return;
	
	// See: https://dev.evernote.com/doc/articles/note_links.php
	var userId = ENConfig.userId;
	var shardId = $("script:contains('userStoreUrl')").text().split('shard/')[1].split('/')[0];
	var noteGuid = ENNote.guid;
	var url = "evernote:///view/" + userId + "/" +shardId + "/" + noteGuid + "/" + noteGuid;

	// insert at the beginning of the note
	setTimeout(function() {
		if(!placeURI(url))
			setTimeout(arguments.callee, 400);
	}, 400);
});