المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Greasemonkey To Firefox Add-On Compiler



A7med Baraka
09-02-2009, 04:10 AM
Greasemonkey To Firefox Add-On Compiler (http://www.ghacks.net/2009/08/31/greasemonkey-to-firefox-add-on-compiler/)




Some Greasemonkey scripts can really improve the usability on specific websites. We have reviewed several popular scripts before including Greasemonkey scripts for IMDB (http://www.ghacks.net/2009/06/04/12-imdb-userscripts/), Twitter (http://www.ghacks.net/2009/06/16/9-twitter-userscripts/), 4Chan (http://www.ghacks.net/2009/06/01/4chan-cleaner-and-image-expander/), Youtube (http://www.ghacks.net/2009/04/24/youtube-enhance-youtube-experience/) or Google Search (http://www.ghacks.net/2009/04/07/spice-up-google-search-with-google-fx/). Greasemonkey scripts require the Firefox (http://www.ghacks.net/tag/firefox/) Greasemonkey extension before they can be installed. Users who want to be notified about userscript updates need to install another userscript to do so (read Greasemonkey Updater (http://www.ghacks.net/2009/05/03/greasemonkey-userscripts-updater/)).

The Greasemonkey Compiler is an online tool that can be used to convert Greasemonkey userscripts into Firefox add-ons. One of the main advantages of Firefox add-ons is that they do not require the Greasemonkey extension to be installed. This makes it also easier to distribute the script.


The Greasemonkey Compiler is a simple web form. Some of the needed parameters are already filled out automatically including a random GUID and the compatible Firefox versions. They can be edited easily to keep the Greasemonkey script compatible with future Firefox versions.




http://www.ghacks.net/wp-content/uploads/2009/08/greasemonkey_compiler-500x187.jpg


All that needs to be done is to paste the complete source code of the Greasemonkey script into the User Script text form on the website. A click on Compile will create a Firefox add-on based on the uscript with the xpi extension. This add-on can then be installed in the Firefox web browser where it will provide the same functionality that the Greasemonkey script would offer.


There are two problems associated with the conversion of Greasemonkey scripts into Firefox add-ons using the Greasemonkey Compiler (http://blog.arpitnext.com/greasemonkey-compiler-xpi/). Options that might have been provided by the Greasemonkey script are not carried over into the Firefox add-on. This can be problematic for some scripts that can be configured. The second problem is that the script has to be updated manually by performing the same conversion with a newer version of the script.