Created
May 18, 2014 08:21
-
-
Save ssig33/5ffa61f3e57366c99281 to your computer and use it in GitHub Desktop.
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 優等列車大量購入 | |
// @namespace http://ssig33.com/ | |
// @version 1.0 | |
// @description enter something useful | |
// @match http://meicolle.kdns.info/ | |
// @copyright 2014+, ssig33 | |
// ==/UserScript== | |
var buy_car = function(){ | |
if(money.ticket<=0){ | |
altAlert("優等車購入チケットがありません"); | |
money.ticket=0; | |
return; | |
}else{ | |
money.ticket -= 1; | |
} | |
$.getJSON("newexp.cgi?"+Math.random(),function(json){ | |
addNewCar(json.kind,json.storage); | |
refreshCarList(); | |
}); | |
} | |
var new_exp_car_10 = function(){ | |
if(confirm('本当に購入しますか?')){ | |
buy_car(); | |
buy_car(); | |
buy_car(); | |
buy_car(); | |
buy_car(); | |
buy_car(); | |
buy_car(); | |
buy_car(); | |
buy_car(); | |
buy_car(); | |
} | |
} | |
window.onload = function(){ | |
var $h1 = $('<h1>'); | |
var $a = $('<a>').attr('href', 'javascript:void(0)').text('優等列車購入 10 編成'); | |
$a.click(function(){new_exp_car_10()}); | |
$h1.html($a) | |
$('a[href="museum.html"').before($h1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment