Changeset [e72eb05d6c0836739f1879178687e1a47f967dae] by Olivier Cornu

April 25th, 2009 @ 06:26 PM

Change the Script file structure and install process

This is quite a big commit, originating from a change of Script file structure: - a Script now has its own directory property (of type File) - all its files are defined by their name, relatively to directory This changes the way new scripts are created, source-viewed or installed: - a new folder is created in the temp dir - it is populated with script files as needed - on install, this folder is moved into the Webmonkey scripts folder

As a consequence, Script instances are created thanks to 3 new factory methods: - Script.fromConfig for loading existing scripts on start-up - Script.fromSource for creating new scripts from source code - Script.fromUri for installing or source-viewing scripts Script dependencies can be fetched thanks to the fetchDeps() Script method. These last 2 methods rely on File.load() and replace ScriptDownloader.

This new structure/mechanism make things simpler: - scriptdownloader.js is removed - browser.js, install.js and newscript.js directly manipulate Script instances - WebmonkeyService looses _ignoreNextScript and ignoreNextScript() - the script update functionality should be easier to implement http://github.com/ocornu/webmonk...

Committed by Olivier Cornu

  • M src/chrome/content/browser.js
  • M src/chrome/content/browser.xul
  • M src/chrome/content/install.js
  • M src/chrome/content/install.xul
  • M src/chrome/content/lib/scriptdownloader.js
  • M src/chrome/content/lib/utils.js
  • M src/chrome/content/newscript.js
  • M src/chrome/content/newscript.xul
  • M src/components/webmonkey.js
  • M src/modules/config.js
  • M src/modules/script.js
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Webmonkey is a fork of the popular Greasemonkey extension for Firefox.