Evernote Web in-app note link

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

目前为 2015-04-26 提交的版本。查看 最新版本

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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址