返回   qkShare香港討論區 > 消閒娛樂 > Facebook
註冊 論壇輔助說明 會員名單 搜尋 今日新文章 標記討論區已讀


回覆
 
主題工具 顯示模式
舊 09-10-2008, 09:34   #1
初心者
 
註冊日期: Jan 2008
文章: 150
積分: 6119
toothpaste5736
預設 Facebook 古惑仔 Online 自動存錢機 Version 1.1

今次改善左個page 有時d 錢冇update 到旣問題。 之前唔 refresh 個頁面, 因為有時click 左 button (即係 post) 之後, refresh 時 firefox 就會問你重新傳送過資料, 令到個script 停頓, 所以焗住用 get。
而家段 script 就會判斷個page 係唔係之前 click 過 button, 如果係就用 get, 否則就會用 post。要注意地方係段 script 唔會判斷人為旣 post。心水清旣相信會諗到解決辦法, 就係 post 存錢/提錢時個頁面會有段訊息, 用嗰段訊息就可以知道係唔係 post。


引用:
// ==UserScript==
// @name auto bank-in
// @namespace hk.orz
// @include http://apps.facebook.com/street-wars/*
// @description by neo@orz.hk, please visit http://orz.hk
// ==/UserScript==

var last_load = new Date();

// setup a count down box
var htmlElement = document.createElement('div');
htmlElement.id = 'timer';
htmlElement.style.color = 'white';
htmlElement.style.position = 'fixed';
htmlElement.style.width = '50px';
htmlElement.style.height = '20px';
htmlElement.style.textAlign = 'center';
htmlElement.style.paddingTop = '4px';
htmlElement.style.paddingTop = '2px';
htmlElement.innerHTML = 'start';
window.parent.document.body.appendChild(htmlElement);
window.setTimeout(function() { tick() }, 1);

function tick() {
current = new Date();
minutes = (current - last_load) / 1000 / 60;

// click the deposit button if there is money to save
if (document.getElementsByName("amount").length > 1)
if (document.getElementsByName("amount")[1].value != '0') {
GM_setValue('reload', 1);
document.getElementsByName("deposit")[0].click();
}

// display the minute
htmlElement.innerHTML = minutes ;

// we only refresh in first/last 5 minutes, as the revenue period
if (current.getMinutes() < 10 || current.getMinutes() > 50) {
htmlElement.style.background = 'red';
// check each minute
if (minutes > 2) {
if (GM_getValue('reload') == 0) {
location.href='http://apps.facebook.com/street-wars/bank.php';
GM_setValue('reload', 1);
} else {
location.reload();
}
}
} else {
htmlElement.style.background = 'green';
}

// come back again every 10 seconds
window.setTimeout(function() { tick()}, 10000);
}
toothpaste5736 目前離線   回覆時引用此篇文章
舊 04-23-2009, 14:48   #2
初心者
 
註冊日期: Apr 2009
文章: 109
積分: 8
galaxy_solar
預設

thanks
galaxy_solar 目前離線   回覆時引用此篇文章
回覆


目前檢視此主題的會員: 1 (0 位會員和 1 位遊客)
 
主題工具
顯示模式

發表文章規則
不可以發表新主題
不可以回覆主題
不可以上傳附件
不可以編輯您的文章

開啟 vB 代碼
關閉 HTML 程式碼
Trackbacks are 關閉
Pingbacks are 關閉
Refbacks are 關閉
論壇跳轉

相似的主題
主題 主題作者 討論區 回覆 最後發表
Online TV + Online Radio -3in1- (BEST) crazy72861 軟件分享區 15 今天 16:40
Facebook 古惑仔攻略 toothpaste5736 Facebook 4 06-12-2009 13:55
Facebook 古惑仔 Online 自動存錢做任務機 Version 1.0 toothpaste5736 Facebook 1 06-12-2009 13:55
預備用 Facebook 古惑仔 Online 自動做任務同存錢機 toothpaste5736 Facebook 2 04-25-2009 00:12
Facebook 辦工室 Online 自動機 by Moochi toothpaste5736 Facebook 0 09-10-2008 09:28


所有時間均為 +8。現在的時間是 19:46


qkShare All Rights Reserved.
重要聲明:本討論區是以即時上載留言的方式運作,qkShare香港討論區 對所有留言的真實性、完整性及立場等,不負任何 法律責任。而一切留言之言論只代表留言者個人意見,並非本網站之立場,用戶不應信賴內容,並應自行判斷內容之真實性。於有關情形下,用戶應尋求專業意見 (如涉及醫療、法律或投資等問題)。 由於本討論區受到「即時上載留言」運作方式所規限,故不能完全監察所有留言,若讀者發現有留言出現問題,請聯絡我們。qkShare香港討論區有權刪除任何留言及拒絕任何人士上載留言,同時亦有不刪除留言的權利。切勿撰寫粗言穢語、誹謗、渲染色情暴力或人身攻擊的言論,敬請自律。本網站保留一切法律權利。