Created
June 26, 2016 02:43
-
-
Save bestony/f20917a52fde8d5d7f6e39447e2d7aa4 to your computer and use it in GitHub Desktop.
阿里云云栖社区不能新页面打开链接,回答问题时比较麻烦。可以加这个脚本,实习新页面打开!
This file contains hidden or 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 阿里云问答社区自动新页面打开 | |
// @namespace http://www.ixiqin.com/ | |
// @version 0.1 | |
// @description 阿里云问答新页面自动打开~ | |
// @author 西秦公子 | |
// @match https://yq.aliyun.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
//var base = document.createElement('base'); | |
//base.target="_blank"; | |
//document.getElementsByTagName('head')[0].appendChild(base); | |
Array.from(document.querySelectorAll('a')).forEach(function(anchor) { | |
anchor.setAttribute('target', '_blank'); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment