Skip to content

Instantly share code, notes, and snippets.

@nobodyplace
Created May 18, 2011 02:27
Show Gist options
  • Save nobodyplace/977882 to your computer and use it in GitHub Desktop.
Save nobodyplace/977882 to your computer and use it in GitHub Desktop.
Yahoo!Japanの記事右下にある産経新聞へのリンクをイザ!からMSNに変更する
// ==UserScript==
// @name yahoojp2sankei
// @version 0.0.1
// @namespace http://nplll.com
// @description Yahoo!Japannの産経新聞へのリンクをイザ!からMSNに変更する
// @include http://headlines.yahoo.co.jp/*
// @updated 2011/05/18 11:00
// ==/UserScript==
// 0.0.1 - 2011/05/18 リリース
(function(){
var y = document.getElementById('ynDetail');
for(var i in y.childNodes){
var c=y.childNodes[i];
if(c.className == 'ynCobrandBanner'){
var a = c.firstChild;
a.target = '_blank';
if(a.href.match(/www\.iza\.ne\.jp/)){
a.href = 'http://sankei.jp.msn.com/';
}
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment