Changeset 695
- Timestamp:
- 03/16/08 18:19:08 (9 months ago)
- Files:
-
- trunk/src/chrome/chromeFiles/content/config.js (modified) (1 diff)
- trunk/src/chrome/chromeFiles/content/manage.js (modified) (1 diff)
- trunk/src/chrome/chromeFiles/content/pages-overlay.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/chrome/chromeFiles/content/config.js
r694 r695 71 71 for (var i = 0, childNode; childNode = node.childNodes[i]; i++) { 72 72 switch (childNode.nodeName) { 73 case "Include":74 script._includes.push(childNode.firstChild.nodeValue);75 break;76 case "Exclude":77 script._excludes.push(childNode.firstChild.nodeValue);78 break;79 case "Require":80 var scriptRequire = new ScriptRequire(script);81 scriptRequire._filename = childNode.getAttribute("filename");82 script._requires.push(scriptRequire);83 break;84 case "Resource":85 var scriptResource = new ScriptResource(script);86 scriptResource._name = childNode.getAttribute("name");87 scriptResource._filename = childNode.getAttribute("filename");88 scriptResource._mimetype = childNode.getAttribute("mimetype");89 scriptResource._charset = childNode.getAttribute("charset");90 script._resources.push(scriptResource);91 break;73 case "Include": 74 script._includes.push(childNode.firstChild.nodeValue); 75 break; 76 case "Exclude": 77 script._excludes.push(childNode.firstChild.nodeValue); 78 break; 79 case "Require": 80 var scriptRequire = new ScriptRequire(script); 81 scriptRequire._filename = childNode.getAttribute("filename"); 82 script._requires.push(scriptRequire); 83 break; 84 case "Resource": 85 var scriptResource = new ScriptResource(script); 86 scriptResource._name = childNode.getAttribute("name"); 87 scriptResource._filename = childNode.getAttribute("filename"); 88 scriptResource._mimetype = childNode.getAttribute("mimetype"); 89 scriptResource._charset = childNode.getAttribute("charset"); 90 script._resources.push(scriptResource); 91 break; 92 92 } 93 93 } trunk/src/chrome/chromeFiles/content/manage.js
r694 r695 25 25 26 26 switch (event) { 27 case "edit-enabled": 28 node.style.color = data ? "" : "gray"; 29 if (script == selectedScript) 30 chkEnabled.checked = data; 31 break; 32 case "install": 33 addListitem(script, -1); 34 break; 35 case "uninstall": 36 var selected = listbox.selectedItem == node; 37 listbox.removeChild(node); 38 39 if (selected && listbox.childNodes.length > 0) { 40 chooseScript(Math.max(Math.min(listbox.selectedIndex, 41 listbox.childNodes.length - 1), 0)); 42 } 43 break; 44 case "move": 45 listbox.removeChild(node); 46 listbox.insertBefore(node, listbox.childNodes[data]); 47 // then re-select the dropped script 48 listbox.selectedIndex = data; 49 break; 27 case "edit-enabled": 28 node.style.color = data ? "" : "gray"; 29 if (script == selectedScript) 30 chkEnabled.checked = data; 31 break; 32 case "install": 33 addListitem(script, -1); 34 break; 35 case "uninstall": 36 var selected = listbox.selectedItem == node; 37 listbox.removeChild(node); 38 39 if (selected && listbox.childNodes.length > 0) { 40 chooseScript(Math.max(Math.min(listbox.selectedIndex, listbox.childNodes.length - 1), 0)); 41 } 42 break; 43 case "move": 44 listbox.removeChild(node); 45 listbox.insertBefore(node, listbox.childNodes[data]); 46 // then re-select the dropped script 47 listbox.selectedIndex = data; 48 break; 50 49 } 51 50 trunk/src/chrome/chromeFiles/content/pages-overlay.js
r694 r695 5 5 this.notifyEvent = function(script, event, data) { 6 6 switch (event) { 7 case "edit-include-add": includesBox.pageAdded(data);break;8 case "edit-include-remove": includesBox.pageRemoved(data); break;9 case "edit-exclude-add": excludesBox.pageAdded(data);break;10 case "edit-exclude-remove": excludesBox.pageRemoved(data); break;7 case "edit-include-add": includesBox.pageAdded(data); break; 8 case "edit-include-remove": includesBox.pageRemoved(data); break; 9 case "edit-exclude-add": excludesBox.pageAdded(data); break; 10 case "edit-exclude-remove": excludesBox.pageRemoved(data); break; 11 11 } 12 12 };
