Skip to content

Instantly share code, notes, and snippets.

@syoichi
Forked from nobodyplace/yahoojp2sankei.user.js
Created May 18, 2011 11:15
Show Gist options
  • Save syoichi/978388 to your computer and use it in GitHub Desktop.
Save syoichi/978388 to your computer and use it in GitHub Desktop.
Firefox 4.0.1上のGreasemonkey 0.9.3、Scriptish 0.1、Chrome 11.0.696.68で動作を確認した。
// ==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 リリース
var a = document.querySelector('.ynCobrandBanner > a');
if (a) {
a.target = '_blank';
if (/www\.iza\.ne\.jp/.test(a.href)) {
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