作者Hemiola ()
看板Browsers
標題Re: [情報] PCMan for Firefox 0.2.4 修正Fx4相容問題
時間Tue Sep 14 10:03:46 2010
我有一個提議:
將 pcman.js 裏的 updateTabIcon 函式,後面加上幾行如下:
if (browserIndex > -1) {
let tab = rw.gBrowser.mTabContainer.childNodes[browserIndex];
tab.image = icon;
switch (aStatus) {
case 'connect':
tab.setAttribute("protected", "true");
tab.setAttribute("locked", "true");
break;
case 'disconnect':
tab.removeAttribute("protected");
tab.removeAttribute("locked");
break;
}
}
這樣一來,如果使用者安裝有 Tab Mix Plus、Tab Utilities 等套件,
則連線後會自動保護及鎖定分頁,就不怕因為不小心按到書籤或關閉分頁,
而導致意外斷線。
連線結束後,又自動解除保護及鎖定分頁,使用者又可以繼續瀏覽一般網頁。
做個參考。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.193.89.86
※ 編輯: Hemiola 來自: 123.193.89.86 (09/14 10:04)
→ talan:推 發生了幾次誤關了BBS 09/14 15:53
→ WFXX:我比較想問可以藉由這樣方式擋掉firegeastures嗎? 09/14 16:44
Firegeastures 的話沒辦法喔,要另外寫 code
※ 編輯: Hemiola 來自: 123.193.89.86 (09/14 17:16)