Skip to content

Instantly share code, notes, and snippets.

@zlargon
Created June 25, 2016 10:35
Show Gist options
  • Save zlargon/63cbcf4b3024c9343be012f1d91bac39 to your computer and use it in GitHub Desktop.
Save zlargon/63cbcf4b3024c9343be012f1d91bac39 to your computer and use it in GitHub Desktop.
tixcraft Hacking
<select name="dateSearchGameList" id="dateSearchGameList">
<option value="" selected="selected">請選擇日期</option>
<option value="2016/08/13 (六)">2016/08/13 (六)</option>
<option value="2016/08/14 (日)">2016/08/14 (日)</option>
</select>
<input placeholder="請輸入搜尋關鍵字" type="text" name="keySearchGameList" id="keySearchGameList" />
<div id="gameList" class="grid-view">
<table class="normal">
<thead>
<tr>
<th id="gameList_c0">演出時間</th>
<th id="gameList_c1">場次名稱</th>
<th id="gameList_c2">場地</th>
<th id="gameList_c3">購買狀態</th>
</tr>
</thead>
<tbody>
<tr class="gridc fcTxt">
<td>2016/08/13 (六) 18:30</td>
<td class="gridl fcDark">五月天 JUST ROCK IT 2016 就是演唱會 高雄無限放大版</td>
<td class="fcDark">高雄世運主場館</td>
<td>
<input data-href="/ticket/area/16_JRI_KH/1495" name="yt0" type="button" value="立即訂購" />
</td>
</tr>
<tr class="gridc fcTxt">
<td>2016/08/14 (日) 18:30</td>
<td class="gridl fcDark">五月天 JUST ROCK IT 2016 就是演唱會 高雄無限放大版</td>
<td class="fcDark">高雄世運主場館</td>
<td>
<input data-href="/ticket/area/16_JRI_KH/1498" name="yt1" type="button" value="立即訂購" />
</td>
</tr>
</tbody>
</table>
<div class="keys" style="display:none" title="/activity/game/16_JRI_KH"><span>1495</span><span>1498</span></div>
</div>
<script>
$(".normal input:button").on("click", function(event) {
window.location.href = $(event.target).attr("data-href");
});
var searchGameList = function(e) {
var searchKey = [$("#dateSearchGameList").val(), $("#keySearchGameList").val()];
$("#gameList table tbody tr").show().css("display", "");
for (var key in searchKey) {
$("#gameList table tbody tr:visible").each(function() {
if ($(this).text().toLowerCase().search(new RegExp(searchKey[key].toLowerCase().replace(/([()[{*+.$^\|?])/g, "\\$1"))) === -1) {
$(this).hide()
};
});
}
}
$("#dateSearchGameList").on({
"change": searchGameList
});
$("#keySearchGameList").on({
"type": searchGameList,
"keydown": searchGameList,
"keyup": searchGameList,
"keypress": searchGameList
});
</script>
@zlargon
Copy link
Author

zlargon commented Jun 25, 2016

http://tixcraft.com/activity/detail/16_JRI_KH

$.get("https://cdn.rawgit.com/zlargon/63cbcf4b3024c9343be012f1d91bac39/raw/mayday.html", function(response) {
  $("#gameListContainer").html(response).slideDown("slow", function() {
    linklock = false;
  });
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment