Created
July 31, 2017 15:09
-
-
Save omgmog/5929bfc3f99631ec718b04769a41be46 to your computer and use it in GitHub Desktop.
Open all of the issues in new tabs when clicking a link of `href="open10"`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Open all the issues | |
// @namespace https://blog.omgmog.net/ | |
// @version 0.1 | |
// @description Opens all of the issues on the current page in new windows | |
// @author You | |
// @match https://github.com/*/*/issues | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function open10click(e) { | |
e.preventDefault(); | |
let links = document.querySelectorAll('.issues-listing .js-issue-row .js-navigation-open'); | |
for (let i=0; i<links.length;i++) { | |
window.open(links[i].href, i); | |
} | |
} | |
document.querySelector('[href="#open10"]').onclick = open10click; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Used in conjunction with this userscript: https://greasyfork.org/scripts/20830-github-custom-navigation/code/GitHub%20Custom%20Navigation.user.js
Icon: