Skip to content

Instantly share code, notes, and snippets.

@frogcat
Last active April 4, 2018 06:13
Show Gist options
  • Save frogcat/9adb175f60198d3e260cfb582838c6d4 to your computer and use it in GitHub Desktop.
Save frogcat/9adb175f60198d3e260cfb582838c6d4 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name www.nta.go.jp to warp
// @namespace https://gist.github.com/frogcat/9adb175f60198d3e260cfb582838c6d4
// @version 0.1
// @description 国税庁へのリンクを 2018/03/01 時点の WARP へのリンクに書き換え
// @author frogcat
// @include *
// @exclude http://www.nta.go.jp/*
// @exclude https://www.nta.go.jp/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
[].slice.call(document.links).forEach(function(link){
if(link.href.indexOf("https://www.nta.go.jp/")===0)
link.href=link.href.replace("https://","http://warp.da.ndl.go.jp/info:ndljp/pid/11056018/");
else if(link.href.indexOf("http://www.nta.go.jp/")===0)
link.href=link.href.replace("http://","http://warp.da.ndl.go.jp/info:ndljp/pid/11056018/");
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment