Changeset 700
- Timestamp:
- 03/28/08 06:15:10 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/manage-ui2/src/chrome/chromeFiles/content/config.js
r699 r700 265 265 var existingIndex = this._find(script); 266 266 if (existingIndex > -1) { 267 this.uninstall(this._scripts[existingIndex] , false);267 this.uninstall(this._scripts[existingIndex]); 268 268 } 269 269 … … 285 285 }, 286 286 287 uninstall: function(script , uninstallPrefs) {287 uninstall: function(script) { 288 288 var idx = this._find(script); 289 289 this._scripts.splice(idx, 1); … … 297 297 // if script is in the root, just remove the file 298 298 script._file.remove(false); 299 }300 301 if (uninstallPrefs) {302 // Remove saved preferences303 GM_prefRoot.remove("scriptvals." + script._namespace + "/" + script._name + ".");304 299 } 305 300 }, … … 415 410 get enabled() { return this._enabled; }, 416 411 set enabled(enabled) { this._enabled = enabled; this._changed("edit-enabled", enabled); }, 412 get prefBranch() { return "scriptvals." + this._namespace + "/" + this._name + "."; }, 417 413 418 414 get includes() { return this._includes.concat(); }, branches/manage-ui2/src/chrome/chromeFiles/content/manage.js
r695 r700 111 111 112 112 function handleUninstallButton() { 113 var uninstallPrefs = document.getElementById("chkUninstallPrefs").checked; 114 config.uninstall(selectedScript, uninstallPrefs); 113 if (document.getElementById("chkUninstallPrefs").checked) { 114 // Remove saved preferences 115 GM_prefRoot.remove(selectedScript.prefBranch); 116 } 117 118 config.uninstall(selectedScript); 115 119 } 116 120 branches/manage-ui2/src/chrome/chromeFiles/content/miscapis.js
r694 r700 1 1 function GM_ScriptStorage(script) { 2 this.prefMan = new GM_PrefManager(["scriptvals.", 3 script.namespace, 4 "/", 5 script.name, 6 "."].join("")); 2 this.prefMan = new GM_PrefManager(script.prefBranch); 7 3 } 8 4
