Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 27th, 2015  |  syntax: JavaScript  |  size: 0.59 KB  |  views: 174  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print  |  QR code  |  clone
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // ==UserScript==
  2. // @name        feedly link opener
  3. // @namespace   .
  4. // @description Press Q to open all unread links on the feedly page.
  5. // @include     http://feedly.com/*
  6. // @version     1
  7. // @grant       none
  8. // ==/UserScript==
  9.  
  10. document.addEventListener("keydown", keyDownFunc, false);
  11.  
  12. function keyDownFunc(e){
  13.         keycode = e.which;
  14.         if (keycode == 81){
  15.                 openLinks();
  16.         }
  17. }
  18.  
  19. function openLinks(){
  20.     var links = document.getElementsByClassName("title unread");
  21.     var hrefs = [];
  22.     for(i = 0; i < links.length; i+=1){
  23.         window.open(links[i].href, "_blank");
  24.     }
  25. }
clone this paste RAW Paste Data