Evernote Web in-app note link

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

  1. // ==UserScript==
  2. // @name Evernote Web in-app note link
  3. // @namespace http://andrealazzarotto.com/
  4. // @version 1.2.1
  5. // @description This scripts shows the internal "evernote:///" URI of a note
  6. // @match http://www.evernote.com/Home.action*
  7. // @match https://www.evernote.com/Home.action*
  8. // @match http://www.evernote.com/view/notebook/*
  9. // @match https://www.evernote.com/view/notebook/*
  10. // @copyright 2015, Andrea Lazzarotto
  11. // @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
  12. // @require https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.1/jquery.min.js
  13. // ==/UserScript==
  14.  
  15. var placeURI = function(url) {
  16. $("#noteURI").remove();
  17. var selector = $("div[style*='top'] > div[style*='relative'] > div[tabindex]").first();
  18. if(!selector.length)
  19. return false;
  20. selector.before("<p id='noteURI'><span>Note link:</span> <a href='" + url + "'>" + url + "</a></p>");
  21. $("#noteURI").css({
  22. 'font-size': '1.25em',
  23. 'margin-bottom': '.8em'
  24. });
  25. $("#noteURI a").css({
  26. 'font-family': 'monospace'
  27. });
  28. $("#noteURI span").css({
  29. 'font-weight': 'bold',
  30. 'font-variant': 'small-caps'
  31. });
  32. return true;
  33. }
  34.  
  35. var bootstrap = function() {
  36. // See: https://dev.evernote.com/doc/articles/note_links.php
  37. var userId = ENConfig.userId;
  38. var shardId = $("script:contains('userStoreUrl')").text().replace(/.*shard\/(s[0-9]+).*/, "$1");
  39. var noteGuid = (location.href+"&n=").split('n=')[1].split('&')[0];
  40. if (noteGuid.length == 0)
  41. return;
  42. var url = "evernote:///view/" + userId + "/" +shardId + "/" + noteGuid + "/" + noteGuid;
  43.  
  44. // insert at the beginning of the note
  45. setTimeout(function() {
  46. if(!placeURI(url))
  47. setTimeout(arguments.callee, 200);
  48. }, 0);
  49. }
  50.  
  51. $(document).ready(function() {
  52. bootstrap();
  53. $(window).bind('hashchange', bootstrap);
  54. });

QingJ © 2025

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