Skip to content

Instantly share code, notes, and snippets.

@bethropolis
Last active April 21, 2021 01:06
Show Gist options
  • Save bethropolis/07f7d87897480ede0532273c594bc98a to your computer and use it in GitHub Desktop.
Save bethropolis/07f7d87897480ede0532273c594bc98a to your computer and use it in GitHub Desktop.
Open github search links in new tab
// ==UserScript==
// @name Github search open in new tab
// @namespace bethropolis.github
// @include https://github.com/search?*
// @version 0.1
// @homepage https://greasyfork.org/en/scripts/425294-github-search-open-in-new-tab
// @description open search results in new tab.
// @license MIT
// @updateURL https://openuserjs.org/meta/Jav_bethro/Github_search_open_in_new_tab.meta.js
// @downloadURL https://openuserjs.org/install/Jav_bethro/Github_search_open_in_new_tab.user.js
// @copyright 2021, Jav_bethro (https://github.com/bethropolis)
// ==/UserScript==
(function () {
'use strict';
let a = document.querySelectorAll(".repo-list")
a.forEach(function (ca) {
ca.querySelector('a').setAttribute('target', '_blank')
})
// Your code here...
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment