Skip to content

Instantly share code, notes, and snippets.

@x0x8x
Forked from toru-hamaguchi/userscript.js
Created May 12, 2017 02:41
Show Gist options
  • Select an option

  • Save x0x8x/e1f49d4b0a1c2fac4b9381de31cc3db2 to your computer and use it in GitHub Desktop.

Select an option

Save x0x8x/e1f49d4b0a1c2fac4b9381de31cc3db2 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Open Feedly in Background
// @author toru hamaguchi
// @namespace https://gist.github.com/toru-hamaguchi/9916038#file-userscript-js
// @description Open Feedly feed item in background tab.
// @license Creative Commons Attribution License
// @version 0.1
// @include http*://feedly.com/*
// @compatible Greasemonkey
// ==/UserScript==
/*
* This file is a Greasemonkey user script. To install it, you need
* the Firefox plugin "Greasemonkey" (URL: http://greasemonkey.mozdev.org/)
* After you installed the extension, restart Firefox and revisit
* this script. Now you will see a new menu item "Install User Script"
* in your tools menu.
*
* To uninstall this script, go to your "Tools" menu and select
* "Manage User Scripts", then select this script from the list
* and click uninstall :-)
*
* Creative Commons Attribution License (--> or Public Domain)
* http://creativecommons.org/licenses/by/2.5/
*/
(function() {
const TRIGGER_KEY = 59; // ";"
document.addEventListener('keypress', function(e) {
var el;
if ((!e.altKey && !e.ctrlKey) && e.which === TRIGGER_KEY) {
el = document.querySelector('.selectedEntry a.title');
if (el === null){
return;
}
e.stopPropagation();
e.preventDefault();
GM_openInTab(el.href);
}
}, true);
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment