Created
April 30, 2015 13:58
-
-
Save yatt/1419e6a3d44999afbb4c to your computer and use it in GitHub Desktop.
link euler project problem to http://odz.sakura.ne.jp/
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 ScriptEuler | |
| // @namespace http://d.hatena.ne.jp/yatt/ | |
| // @description link euler project problem to http://odz.sakura.ne.jp/ | |
| // @include https://projecteuler.net/archives* | |
| // ==/UserScript== | |
| (function(){ | |
| var lst = document.getElementsByClassName('id_column') | |
| var prefix = 'http://odz.sakura.ne.jp/projecteuler/index.php?cmd=read&page=Problem%20' | |
| for (var i = 1 ; i < lst.length; i++) | |
| { | |
| var no = lst[i].innerHTML | |
| var a = document.createElement('a') | |
| a.href = prefix + no | |
| a.innerText = no | |
| lst[i].innerText = '' | |
| lst[i].appendChild(a) | |
| } | |
| })() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment