Skip to content

Instantly share code, notes, and snippets.

Created January 11, 2016 07:39
Show Gist options
  • Save anonymous/d679ccc3becb62d9cb50 to your computer and use it in GitHub Desktop.
Save anonymous/d679ccc3becb62d9cb50 to your computer and use it in GitHub Desktop.
修复12306自动刷火车票中断的问题。
/*
* 使用方法:
* 1. 设置好自动查询
* 2. 打开控制栏
* windows下无论什么浏览器按快捷键F12
* Mac下按快捷键 Command + option + I
* */
function autoCheck(){
if($('#sear-result').width() || $('#qd_closeDefaultWarningWindowDialog_id').width()){
var query = $('#query_ticket')
query.click();
if (query.text() == '查询'){
query.click();
}
}
}
var autoCheckInterval = setInterval(autoCheck, 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment