2013-07-12 24 views
0

我想找到或創建一個Firefox擴展,可以創建並保存到文件夾,基於頁面標籤中的文本。Firefox擴展保存到網頁上的文本後命名的文件夾

我希望它做到以下幾點:

a. Check the page's html for a certain tag name (e.g. <itemName>), 
b. Use a regular expression to look for a text pattern within the tag mentioned above (e.g. first and last name like - <itemName>Abe Lincoln</itemName>), 
c. Compare that pattern to folders already existing on the computer, 
    c-i. If the folder exists, then just save the file (from a certain domain, in certain tag, etc) from the page to that folder, 
    c-ii. If the folder does not exist, then create it and then save the aforementioned file from the page to that folder. 

d. Close the page/tab. 

我一直在網上淘了這樣的事情,但作爲然而,我還沒有發現的東西,可以做到這一點。有沒有這樣的事情? 如果沒有,是否可以創建一個可以使用正則表達式的擴展,就像我需要的一樣?

感謝您的幫助。

回答

1

不知道是否有一個現有的擴展,這樣做,但你是可以很容易地在Firefox擴展使用JavaScript支持正則表達式

開發Firefox擴展Firefox擴展使用正則表達式是一個簡單的任務,你可以搜索TUTS這裏是一個很好的開始與如果你想

http://blog.mozilla.org/addons/2009/01/28/how-to-develop-a-firefox-extension/

還肯定您將需要爲最佳細節developer.mozilla

https://developer.mozilla.org/en/docs/Building_an_Extension

相關問題