-
Notifications
You must be signed in to change notification settings - Fork 0
/
FreedlyEvernote.user.js
29 lines (27 loc) · 1.08 KB
/
FreedlyEvernote.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ==UserScript==
// @name Freedly Evernote
// @description Let free account users share Feedly articles to Evernote
// @author wenLiangcan
// @version 0.1
// @namespace https://github.com/wenLiangcan
// @homepage https://github.com/wenLiangcan/Userscripts
// @license GPL version 3 (http://www.gnu.org/licenses/gpl.txt)
// @copyright Copyright © 2014 wenLiangcan
// @updateURL
// @downloadURL
// @include https://feedly.com/*
// @include http://feedly.com/*
// @run-at document-end
// @grant GM_addStyle
// ==/UserScript==
var addClipper = function() {
var article = document.getElementsByClassName('entryHeader')[0].firstElementChild;
var link = 'http://www.evernote.com/clip.action?url=' + encodeURIComponent(article.href) + '&title=' + encodeURIComponent(article.text);
window.open(link, '_blank');
};
GM_addStyle("div.prominitrigger { display:none; }");
document.addEventListener('click', function(event){
if (event.target.className === 'wikiWidgetAction highlightableIcon clippable') {
addClipper();
}
});