Cityline搶飛
難得有演唱會想看,但不得不說Cityline的網站真的很垃圾…
在進入購票頁之前竟然加了一版”忙碌中”…
把用戶先卡住了,需要你手動去點那個”retry”按鈕
唯有寫個小程序去一直刷…

教程
下載這個chrome plugin

- 在cityline的網頁中打開這個plugin
- 勾選javascript 及 jqeury3

- 把下面這段程式碼貼上去
const PAGE_YOU_DONT_WANT_TO_SEE = 'busy.html';
const RETRY_INTERVAL_IN_MS = 1000;
// Only execute one time
setTimeout(() => {
// only applicable to busy.html
if (window.location.href.indexOf(PAGE_YOU_DONT_WANT_TO_SEE) > 0) {
// Enable the fucking retry button and click it
$("#btn-retry-en-1").prop('disabled', false);
$("#btn-retry-en-1").click();
}
} , RETRY_INTERVAL_IN_MS);
這個小程序會每隔1秒檢查你當下的網址 當發覺你被彈去了正在繁忙這一頁時 就會幫你點重刷按鈕
但可惜到最後仍然買不到票……