顯示具有 firefox 標籤的文章。 顯示所有文章
顯示具有 firefox 標籤的文章。 顯示所有文章

2010年10月4日 星期一

監視DOM的copy, paste事件 (oncopy, onpaste event)


根據 http://en.wikipedia.org/wiki/DOM_events 的說明


Two major types of events are added by Microsoft, and in some cases can only be used in Internet Explorer. Others have been implemented as de-facto standards by other browsers.

Microsoft在自家的ie瀏覽器上,多自訂了以上兩種類型的事件,其中oncopy, onpaste這兩個,上週發現Firefox 3.6, Chrome 6都也可以支援。

document.getElementById(ElementID).addEventListener(eventType, fn);

eventType為'copy' 或是'paste', fn為function.

雖然不是W3C的規格,但這個監視剪貼簿的事件真的不錯用,省去監視keyup/keypress/keydown或是按滑鼠右鍵複製貼上這些實作。

2009年7月23日 星期四

[Firefox Extension] Greasefire

幫你自動偵測符合目前url的userscripts,如果有相關的script的話,狀態列的猴子會冒火。

推薦這個Extension。

安裝頁面

2009年7月14日 星期二

[Greasemonkey Script] 自動載入Google圖片搜尋原始圖片

升上了Firefox 3.5後,發現原本用的 Google Image Ripper 失效了,後來找到了這一個 Google Image search Direct results 也有同樣效果的script,而且還多了Checkbox可以切換原始圖,更加方便。

另外,在搭配AutoPager使用下,也可以運作的很正常。 :)

2009-07-14_112521

2009-07-14_112430

 

連結: Google Image search Direct results - by Futuros

2009年4月7日 星期二

讓Google圖片搜尋直接秀出原本大小的圖片

這是一個Greasemonkey的Script,名為 Google Image Ripper,相當方便。

看下面前後的比較圖應該就可以了解了。

修改前:
2009-04-07_164457

修改後:
2009-04-07_164312

目前只有Firefox的Greasemonkey適用。

安裝點: http://userscripts.org/scripts/show/36918

來源閱讀: Google Image Ripper -- 讓Google圖片搜尋顯示原始圖檔

2009年2月25日 星期三

[Firefox] Extension : RefControl

2009-02-25_210502

我的用途: 在Google Reader裡瀏覽無名小站RSS的圖片。

因為無名小站之類會檢查HTTP referer網站,如果由外部網站連入是無法看到圖片的,這時只要用這個工具加入HTTP referer,就可以讓RSS Reader工具直接看到圖片呦。

用法(參照圖片):

2009-02-25_210742

下載頁面: https://addons.mozilla.org/zh-TW/firefox/addon/953

延伸閱讀: [Firefox外掛]讓你輕鬆突破圖片外連的限制 — RefControl

2008年11月11日 星期二

使用Greasemonkey + jQuery

這兩天讀了一些jQuery的使用方法,跟我去年認識的jQuery有點出入,不過它確實是很好用,如同它宣稱的:「write less, do more.」

我除了使用Javascript Shell來練習外,也想讓Greasemonkey可以直接套用自訂的jQuery script,於是找到了這個東西:

在Greasemonkey裡面加入jQuery的方法

Greasemonkey程式碼:

// Add jQuery
   var GM_JQ = document.createElement('script');
   GM_JQ.src = 'http://jquery.com/src/jquery-latest.js';
   GM_JQ.type = 'text/javascript';
   document.getElementsByTagName('head')[0].appendChild(GM_JQ);

// Check if jQuery's loaded
   function GM_wait() {
       if(typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(GM_wait,100); }
   else { $ = unsafeWindow.jQuery; letsJQuery(); }
   }
   GM_wait();

// All your GM code must be inside this function
   function letsJQuery() {
       alert($); // check if the dollar (jquery) function works
   }

安裝下載點:

Download as a userscript. (需要安裝 greasemonkey )

因為作者允許MIT License,所以我就直接複製貼上了XD

ps. 如果不想要每次載入都出現那個alert(),就自己//掉需要的地方吧XD ;

2008年10月22日 星期三

[Firefox]解除無法記憶登入資訊的方法

一些網站如Yahoo, MSN的登入資訊(帳號、密碼),都無法記憶到Firefox的隱私資料中,安全性是顧到了但確很麻煩,常常登入無名都要慢慢keyin。

今天找到了一個方法,可以解除網站對瀏覽器記憶帳密的限制。

一個bookmarklets: remember password

用法是先開啟登入頁面,再點這個bookmarklets,這時就會解除限制,登入時firefox就會問你要不要記憶了。記憶起來,下次同樣頁面,點一下bookmarklets,再點帳號兩下,就可以快速登入了。

2008-10-22_002543

我想這個東西應該也可以寫成script 用greasemonkey來執行…有空再研究。


2008/10/22補充:

馬上就找到相關的script了。

網址: http://userscripts.org/scripts/show/799

針對所有的頁面都解除,有需要的話,也可以自行修改filter。