This repository has been archived by the owner on Oct 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
popup.html
153 lines (146 loc) · 6.22 KB
/
popup.html
1
<!-- 12306 Assistant Copyright (C) 2012 flytreeleft (flytreeleft@126.com) THANKS: Hidden, Jingqin Lynn, Kevintop Includes jQuery Copyright 2011, John Resig Dual licensed under the MIT or GPL Version 2 licenses. http://jquery.org/license This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" href="main.css" /> <link rel="stylesheet" href="12306/style.css" /> <link rel="stylesheet" href="12306/station.css" /> <link rel="stylesheet" href="12306/table.css" /> <link rel="stylesheet" href="12306/suggest.css" /> <link rel="stylesheet" href="12306/contact.css" /> <link rel="stylesheet" href="12306/WdatePicker.css" /> <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript"> var bp = chrome.extension.getBackgroundPage(); var ctx = 'https://dynamic.12306.cn/otsweb'; var periodOfPresale = bp.periodOfPresale; // 预售期 </script> <script type="text/javascript" src="12306/WdatePicker.js"></script> <script type="text/javascript" src="12306/station_name.js"></script> <script type="text/javascript" src="12306/favorite_name.js"></script> <script type="text/javascript" src="12306/city_name.js"></script> <script type="text/javascript" src="12306/trainCodeSuggest.js"></script> <style> body {width: 500px; height: 280px; border: solid 0px blue;} .font_r{text-align:right;} .ticket_info {margin: 10px 0 0 0;} .user_info {padding: 30px 0 0 60px; margin: 40px 0 0 0; border-top: solid 1px gray;} .operation {float: right; margin: 40px 40px 0 0;} .operation input {width: 60px; height: 25px; font-size: 14px;} </style> <script type="text/javascript"> function save() { $('.ticket_info input[id!=""]').each(function(i, el) { bp.ticket[$(el).attr('id')] = $(el).attr('value'); }); $('.user_info input[id!=""]').each(function(i, el) { bp.user[$(el).attr('id')] = $(el).attr('value'); }); window.close(); } function reset() { $('.ticket_info input[id!=""]').each(function(i, el) { $(el).attr('value', ''); bp.ticket[$(el).attr('id')] = ''; }); $('.user_info input[id!=""]').each(function(i, el) { $(el).attr('value', ''); bp.user[$(el).attr('id')] = ''; }); } $(document).ready(function() { for (var id in bp.user) { $('#'+id).val(bp.user[id]); } for (var id in bp.ticket) { $('#'+id).val(bp.ticket[id]); } }).keyup(function(e){ if (/^13$/.test(e.keyCode)){ save(); } }); </script> </head> <body> <div class="ticket_info"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="cx_from"> <tbody><tr> <td width="60px" class="font_r"><span>*</span>出发地: </td> <td width="100px"> <input type="hidden" name="orderRequest.from_station_telecode" id="fromStation"> <input type="text" name="orderRequest.from_station_name" maxlength="4" id="fromStationText" style="width: 100px;" class="input_20txt_gray"> <input type="hidden" id="station_name_show" name="station_name_show" value="show"> </td> <td width="60px" class="font_r"><span>*</span>目的地: </td> <td width="100px"> <input type="hidden" name="orderRequest.to_station_telecode" id="toStation"> <input type="text" name="orderRequest.to_station_name" maxlength="4" id="toStationText" style="width: 100px;" class="input_20txt"> </td> </tr> <tr> <td width="60px" class="font_r"><span>*</span>出发日期: </td> <td><input type="text" name="orderRequest.train_date" id="startdatepicker" style="width: 150px;" class="input_20txt" readonly=""></td> <td width="60px" class="font_r">出发时间: </td> <td><select name="orderRequest.start_time_str" id="startTime"> <option value="00:00--24:00">00:00--24:00</option> <option value="00:00--06:00">00:00--06:00</option> <option value="06:00--12:00">06:00--12:00</option> <option value="12:00--18:00">12:00--18:00</option> <option value="18:00--24:00">18:00--24:00</option> </select></td> </tr> <tr> <td class="font_r">出发车次: </td> <td colspan="3"><input type="hidden" name="orderRequest.train_no" id="trainCode"> <input type="text" name="orderRequest.trainCodeText" id="trainCodeText" style="width: 200px" class="input_20txt"> <div id="trainCodeSuggest" class="ac_results_width" style="display: none; "></div> </td> </tr> </tbody></table> </div> <div class="user_info"> <span>用户名: </span><input id="UserName" type="text" class="input_20txt_gray"/> <span>密码: </span><input id="password" type="password" class="input_20txt_gray"/> </div> <div class="operation"> <input type="button" value="清空" onclick="reset();"/> <input type="button" value="保存" onclick="save();"/> </div> <div style="top:0;left:0;z-index:1000;POSITION: absolute;"> <div id="form_cities" style="left: 116px; top: 121px; display: none; overflow-x: hidden; overflow-y: hidden; "> <div id="top_cities"></div> <div id="panel_cities"></div> <div id="flip_cities" style="display: block; "></div> </div> </div> <div style="top:0;left:0;z-index:1000;POSITION: absolute;"> <div id="form_cities2" style="left: 116px; top: 121px; display: none; "> <div id="top_cities1"></div> <div id="panel_cities2"> <div id="flip_cities2" style="display: none; "></div> </div> </div> </div> </body></html>