Created
March 4, 2017 07:59
-
-
Save dlukes/7020caeef9ce69ddb4ca5d45377d7f2f to your computer and use it in GitHub Desktop.
CNC Toolbar Links
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 CNC Toolbar Links | |
// @namespace https://trnka.korpus.cz/~lukes | |
// @version 0.2 | |
// @description Make CNC toolbar links open in new windows / tabs. | |
// @author David Lukeš | |
// @match http*://*.korpus.cz/* | |
// @match http*://korpus.cz/* | |
// @grant none | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
waitForKeyElements("#cnc-toolbar", function(node) { | |
node[0].querySelectorAll("li > a").forEach(function(a) { | |
a.setAttribute("target", "_blank"); | |
}); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment