Created
October 3, 2009 02:38
-
-
Save saitamanodoruji/200354 to your computer and use it in GitHub Desktop.
JBBS JUMP JUMP
This file contains 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 JBBS JUMP JUMP | |
// @namespace http://jbbs.livedoor.jp/internet/5983/ | |
// @description random jbbs wandaring | |
// @include http://jbbs.livedoor.jp/* | |
// @version 0.0.0.3 | |
// ==/UserScript== | |
// usage: Press Enter to jump to another board on jbbs. | |
var range = 50000; | |
(function() { | |
var baseUrl = "http://jbbs.livedoor.jp/"; | |
var category = [ | |
"music", | |
"internet", | |
"school", | |
"business", | |
"shop", | |
"game", | |
"sports", | |
"movie", | |
"auto", | |
"radio", | |
"netgame", | |
"otaku", | |
"anime", | |
"study", | |
"computer", | |
"travel", | |
"comic", | |
"news" | |
]; | |
var url = baseUrl + category[Math.floor(Math.random()*18)] + "/" + Math.floor(Math.random()*range) + "/"; | |
addEventListener("keypress", function(e) { | |
if (e.keyCode == 13) { | |
location.href = url; | |
} | |
}, false); | |
var reg = /■ こちらの掲示板は一時休止中です ■|掲示板はユーザーにより閉鎖されました。|・・・ 開設準備中です ・・・|掲示板は一時停止中です。\n再開するには、管理者メニューより設定の更新を行ってください。\n|掲示板はJBBS管理者権限により停止中です。|この掲示板は閉鎖されています。/g; | |
if ( | |
document.title == "指定されたページまたはファイルは存在しません" || | |
document.getElementsByTagName("center")[0].innerHTML.match(reg) | |
) { | |
location.href = url; | |
} | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment