Changeset 727
- Timestamp:
- 04/14/08 06:47:28 (6 months ago)
- Files:
-
- branches/manage-ui2/src (modified) (1 prop)
- branches/manage-ui2/src/build.sh (modified) (1 diff)
- branches/manage-ui2/src/chrome/chromeFiles/content/browser.js (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/content/config.js (modified) (4 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/content/contents.rdf (deleted)
- branches/manage-ui2/src/chrome/chromeFiles/content/default-config.xml (deleted)
- branches/manage-ui2/src/chrome/chromeFiles/content/icon_medium.png (modified) (previous)
- branches/manage-ui2/src/chrome/chromeFiles/content/icon_small.png (modified) (previous)
- branches/manage-ui2/src/chrome/chromeFiles/content/icon_small_disabled.png (modified) (previous)
- branches/manage-ui2/src/chrome/chromeFiles/content/install.xul (modified) (1 diff)
- branches/manage-ui2/src/chrome/chromeFiles/content/manage.xul (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/content/pages-overlay.js (modified) (3 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/content/pages-overlay.xul (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/content/status_off.gif (deleted)
- branches/manage-ui2/src/chrome/chromeFiles/content/status_on.gif (deleted)
- branches/manage-ui2/src/chrome/chromeFiles/content/utils.js (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/content/versioning.js (deleted)
- branches/manage-ui2/src/chrome/chromeFiles/locale/ca-AD/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/ca-AD/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/ca-AD/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/cs-CZ/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/cs-CZ/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/cs-CZ/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/da-DK (copied) (copied from trunk/src/chrome/chromeFiles/locale/da-DK)
- branches/manage-ui2/src/chrome/chromeFiles/locale/da-DK/gm-browser.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/da-DK/gm-browser.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/da-DK/gm-manage.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/da-DK/gm-manage.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/da-DK/greasemonkey.dtd (copied) (copied from trunk/src/chrome/chromeFiles/locale/da-DK/greasemonkey.dtd)
- branches/manage-ui2/src/chrome/chromeFiles/locale/da-DK/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/da-DK/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/de-DE/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/de-DE/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/de-DE/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/en-US/contents.rdf (deleted)
- branches/manage-ui2/src/chrome/chromeFiles/locale/en-US/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/en-US/gm-manage.properties (modified) (1 diff)
- branches/manage-ui2/src/chrome/chromeFiles/locale/en-US/greasemonkey.dtd (modified) (4 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/es-ES/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/es-ES/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/es-ES/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/eu-ES/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/eu-ES/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/eu-ES/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/fa-IR/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/fa-IR/greasemonkey.dtd (modified) (1 diff)
- branches/manage-ui2/src/chrome/chromeFiles/locale/fa-IR/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/fa-IR/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/fi-FI/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/fi-FI/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/fi-FI/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/fr-FR/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/fr-FR/gm-manage.properties (modified) (1 diff)
- branches/manage-ui2/src/chrome/chromeFiles/locale/fr-FR/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/fr-FR/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/gl-ES (copied) (copied from trunk/src/chrome/chromeFiles/locale/gl-ES)
- branches/manage-ui2/src/chrome/chromeFiles/locale/gl-ES/gm-browser.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/gl-ES/gm-browser.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/gl-ES/gm-manage.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/gl-ES/gm-manage.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/gl-ES/greasemonkey.dtd (copied) (copied from trunk/src/chrome/chromeFiles/locale/gl-ES/greasemonkey.dtd)
- branches/manage-ui2/src/chrome/chromeFiles/locale/gl-ES/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/gl-ES/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/he-IL/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/he-IL/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/he-IL/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/it-IT (copied) (copied from trunk/src/chrome/chromeFiles/locale/it-IT)
- branches/manage-ui2/src/chrome/chromeFiles/locale/it-IT/gm-browser.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/it-IT/gm-browser.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/it-IT/gm-manage.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/it-IT/gm-manage.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/it-IT/greasemonkey.dtd (copied) (copied from trunk/src/chrome/chromeFiles/locale/it-IT/greasemonkey.dtd)
- branches/manage-ui2/src/chrome/chromeFiles/locale/it-IT/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/it-IT/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/ja-JP/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/ja-JP/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/ja-JP/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/ko-KR/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/ko-KR/greasemonkey.dtd (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/ko-KR/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/ko-KR/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/nl-NL/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/nl-NL/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/nl-NL/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/pl-PL/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/pl-PL/gm-manage.properties (modified) (1 diff)
- branches/manage-ui2/src/chrome/chromeFiles/locale/pl-PL/greasemonkey.dtd (modified) (1 diff)
- branches/manage-ui2/src/chrome/chromeFiles/locale/pl-PL/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/pl-PL/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/pt-BR/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/pt-BR/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/pt-BR/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/pt-PT (copied) (copied from trunk/src/chrome/chromeFiles/locale/pt-PT)
- branches/manage-ui2/src/chrome/chromeFiles/locale/pt-PT/gm-browser.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/pt-PT/gm-browser.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/pt-PT/gm-manage.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/pt-PT/gm-manage.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/pt-PT/greasemonkey.dtd (copied) (copied from trunk/src/chrome/chromeFiles/locale/pt-PT/greasemonkey.dtd)
- branches/manage-ui2/src/chrome/chromeFiles/locale/pt-PT/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/pt-PT/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/ru-RU/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/ru-RU/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/ru-RU/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/sk-SK/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/sk-SK/gm-manage.properties (modified) (1 diff)
- branches/manage-ui2/src/chrome/chromeFiles/locale/sk-SK/greasemonkey.dtd (modified) (1 diff)
- branches/manage-ui2/src/chrome/chromeFiles/locale/sk-SK/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/sk-SK/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/sl-SI/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/sl-SI/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/sl-SI/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/sv-SE (copied) (copied from trunk/src/chrome/chromeFiles/locale/sv-SE)
- branches/manage-ui2/src/chrome/chromeFiles/locale/sv-SE/gm-browser.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/sv-SE/gm-browser.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/sv-SE/gm-manage.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/sv-SE/gm-manage.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/sv-SE/greasemonkey.dtd (copied) (copied from trunk/src/chrome/chromeFiles/locale/sv-SE/greasemonkey.dtd)
- branches/manage-ui2/src/chrome/chromeFiles/locale/sv-SE/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/sv-SE/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/tr-TR/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/tr-TR/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/tr-TR/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/uk-UA/gm-browser.properties (modified) (1 diff)
- branches/manage-ui2/src/chrome/chromeFiles/locale/uk-UA/gm-manage.properties (modified) (1 diff)
- branches/manage-ui2/src/chrome/chromeFiles/locale/uk-UA/greasemonkey.dtd (modified) (1 diff)
- branches/manage-ui2/src/chrome/chromeFiles/locale/uk-UA/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/uk-UA/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/zh-CN/gm-browser.properties (modified) (2 diffs)
- branches/manage-ui2/src/chrome/chromeFiles/locale/zh-CN/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/zh-CN/greasemonkey.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/zh-TW (copied) (copied from trunk/src/chrome/chromeFiles/locale/zh-TW)
- branches/manage-ui2/src/chrome/chromeFiles/locale/zh-TW/gm-browser.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/zh-TW/gm-browser.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/zh-TW/gm-manage.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/zh-TW/gm-manage.properties)
- branches/manage-ui2/src/chrome/chromeFiles/locale/zh-TW/greasemonkey.dtd (copied) (copied from trunk/src/chrome/chromeFiles/locale/zh-TW/greasemonkey.dtd)
- branches/manage-ui2/src/chrome/chromeFiles/locale/zh-TW/greasemonkey.properties (copied) (copied from trunk/src/chrome/chromeFiles/locale/zh-TW/greasemonkey.properties)
- branches/manage-ui2/src/chrome/icons/default/greasemonkey.ico (modified) (previous)
- branches/manage-ui2/src/chrome/icons/default/greasemonkey.xpm (deleted)
- branches/manage-ui2/src/install.js (deleted)
- branches/manage-ui2/src/install.rdf (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/manage-ui2/src
- Property svn:ignore changed from
build
greasemonkey.xpi
to
build
greasemonkey*.xpi
- Property svn:ignore changed from
branches/manage-ui2/src/build.sh
r633 r727 1 1 #!/bin/sh 2 GMMAX=0 3 GMMIN=8 2 3 # Set up variables 4 GMMAX=${1-0} 5 GMMIN=${2-8} 6 GMREL=${3-0} 4 7 GMBUILD=`date +"%Y%m%d"` 5 GMREL=06 7 8 GMNAME=greasemonkey 8 9 9 GMVER="$GMMAX.$GMMIN.$GMBUILD.$GMREL" 10 10 GMXPI="$GMNAME-$GMVER.xpi" 11 11 12 12 # Copy base structure to a temporary build directory and change to it 13 echo "Creating working directory ..." 13 14 rm -rf build 14 15 mkdir build 15 cp chrome.manifest build/ 16 cp install.js build/ 17 cp install.rdf build/ 18 cp license.txt build/ 19 cp -r defaults build/ 20 cp -r components build/ 21 cp -r chrome build/ 16 cp -r chrome.manifest install.rdf license.txt \ 17 defaults components chrome \ 18 build/ 22 19 cd build 23 20 24 # Generate locales for chrome.manifest from babelzilla directories, which 25 # we assume have been placed in locale/. 21 echo "Gathering all locales into chrome.manifest ..." 26 22 GMLOC=\"en-US\" 27 for entry in $(ls chrome/chromeFiles/locale/); do23 for entry in chrome/chromeFiles/locale/*; do 28 24 if [ $entry != en-US ]; then 29 echo "locale $GMNAME "$entry" chrome/chromeFiles/locale/"$entry"/" >> chrome.manifest25 echo "locale $GMNAME $entry chrome/chromeFiles/locale/$entry/" >> chrome.manifest 30 26 GMLOC=$GMLOC,\ \"$entry\" 31 27 fi 32 28 done 33 29 34 replace () { 35 TMP=`mktemp -t Greasemonkey-build.sh` 36 SRC=`echo "$1" | sed 's/[\/\\\\]/\\\\&/g'` 37 DST=`echo "$2" | sed 's/[\/\\\\]/\\\\&/g'` 38 sed "s/$SRC/$DST/g" "$3" > "$TMP" 39 if cmp -s "$3" "$TMP" ; then 40 # No change! Treat as a failure to react to in caller. 41 rm "$TMP" 42 return 1 43 fi 44 cp "$TMP" "$3" 45 rm "$TMP" 46 return 0 47 } 30 echo "Patching install.rdf version ..." 31 sed "s!<em:version>.*</em:version>!<em:version>$GMVER</em:version>!" \ 32 install.rdf > install.rdf.tmp 33 mv install.rdf.tmp install.rdf 48 34 49 replace '<em:version>.*</em:version>' \ 50 '<em:version>'$GMVER'</em:version>' \ 51 install.rdf 35 echo "Cleaning up unwanted files ..." 36 find . -depth -name '.svn' -exec rm -rf "{}" \; 37 find . -depth -name '*~' -exec rm -rf "{}" \; 38 find . -depth -name '#*' -exec rm -rf "{}" \; 52 39 53 find . -name '.svn' -prune -or -name '.DS_Store' -or -name '*~' -or -name '#*' \ 54 -or -print | zip -9X -@ "$GMXPI" 40 echo "Creating $GMNAME.jar ..." 41 cd chrome 42 zip -qr0X "$GMNAME.jar" chromeFiles icons 43 rm -rf chromeFiles icons 44 cd .. 55 45 56 mv "$GMXPI" ../ 46 echo "Patching chrome.manifest with jar ..." 47 sed -e \ 48 "/^content\|^skin\|^locale/s#\(.*\) chrome/\(.*\)#\1 jar:chrome/$GMNAME.jar!/\2#" \ 49 chrome.manifest > chrome.manifest.jar 50 mv chrome.manifest.jar chrome.manifest 57 51 58 echo "Created $GMXPI" 59 exit 0 52 echo "Creating $GMXPI ..." 53 zip -qr9X "../$GMXPI" * 54 55 echo "Cleaning up temporary files ..." 56 cd .. 57 rm -rf build branches/manage-ui2/src/chrome/chromeFiles/content/browser.js
r701 r727 177 177 "top", 178 178 true /* show close button */, 179 "I"/* access key */);179 this.bundle.getString("greeting.btnAccess") /* access key */); 180 180 } else { 181 181 // Firefox 2.0+ … … 198 198 [{ 199 199 label: this.bundle.getString("greeting.btn"), 200 accessKey: "I",200 accessKey: this.bundle.getString("greeting.btnAccess"), 201 201 popup: null, 202 202 callback: GM_hitch(this, "installCurrentScript") branches/manage-ui2/src/chrome/chromeFiles/content/config.js
r700 r727 1 // In this file protected properties (prefixed with an underscore) may be2 // used anywhere within this file and versioning.js3 4 1 function Config() { 5 2 this._scripts = null; 6 3 this._configFile = this._scriptDir; 7 4 this._configFile.append("config.xml"); 5 this._initScriptDir(); 8 6 9 7 this._observers = []; … … 331 329 332 330 get _scriptDir() { 333 var newDir = this._newScriptDir;334 if (newDir.exists()) return newDir;335 336 var oldDir = this._oldScriptDir;337 if (oldDir.exists()) return oldDir;338 339 // if we called this function, we want a script dir.340 // but, at this branch, neither the old nor new exists, so create one341 newDir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0755);342 343 var defaultConfigFile = getContentDir();344 defaultConfigFile.append("default-config.xml");345 346 defaultConfigFile.copyTo(newDir, "config.xml");347 defaultConfigFile.permissions = 0644;348 349 return newDir;350 },351 352 get _newScriptDir() {353 331 var file = Components.classes["@mozilla.org/file/directory_service;1"] 354 332 .getService(Components.interfaces.nsIProperties) … … 358 336 }, 359 337 360 get _oldScriptDir() { 361 var file = getContentDir(); 362 file.append("scripts"); 363 return file; 338 /** 339 * Create an empty configuration if none exist. 340 */ 341 _initScriptDir: function() { 342 var dir = this._scriptDir; 343 344 if (!dir.exists()) { 345 dir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0755); 346 347 var configStream = getWriteStream(this._configFile); 348 var xml = "<UserScriptConfig/>"; 349 configStream.write(xml, xml.length); 350 configStream.close(); 351 } 364 352 }, 365 353 366 354 get scripts() { return this._scripts.concat(); }, 367 getMatchingScripts: function(testFunc) { return this._scripts.filter(testFunc); } 355 getMatchingScripts: function(testFunc) { return this._scripts.filter(testFunc); }, 356 357 /** 358 * Checks whether the version has changed since the last run and performs 359 * any necessary upgrades. 360 */ 361 _updateVersion: function() { 362 log("> GM_updateVersion"); 363 364 // this is the last version which has been run at least once 365 var initialized = GM_prefRoot.getValue("version", "0.0"); 366 367 if (GM_compareVersions(initialized, "0.8") == -1) 368 this._pointEightBackup(); 369 370 // update the currently initialized version so we don't do this work again. 371 var extMan = Components.classes["@mozilla.org/extensions/manager;1"] 372 .getService(Components.interfaces.nsIExtensionManager); 373 374 var item = extMan.getItemForID(GM_GUID); 375 GM_prefRoot.setValue("version", item.version); 376 377 log("< GM_updateVersion"); 378 }, 379 380 /** 381 * In Greasemonkey 0.8 there was a format change to the gm_scripts folder and 382 * testing found several bugs where the entire folder would get nuked. So we 383 * are paranoid and backup the folder the first time 0.8 runs. 384 */ 385 _pointEightBackup: function() { 386 var scriptDir = this._scriptDir; 387 var scriptDirBackup = scriptDir.clone(); 388 scriptDirBackup.leafName += "_08bak"; 389 if (scriptDir.exists() && !scriptDirBackup.exists()) 390 scriptDir.copyTo(scriptDirBackup.parent, scriptDirBackup.leafName); 391 } 368 392 }; 369 370 Components.classes["@mozilla.org/moz/jssubscript-loader;1"]371 .getService(Components.interfaces.mozIJSSubScriptLoader)372 .loadSubScript("chrome://greasemonkey/content/versioning.js");373 393 374 394 function Script(config) { … … 433 453 var file = this._config._scriptDir; 434 454 file.append(this._basedir); 455 file.normalize(); 435 456 return file; 436 457 }, branches/manage-ui2/src/chrome/chromeFiles/content/install.xul
r688 r727 40 40 > 41 41 <vbox 42 style="background:InfoBackground; border-bottom:1px black dotted; padding:0.5em; margin:0; margin-bottom:0.5em"42 style="background:InfoBackground; color: InfoText; border-bottom:1px black dotted; padding:0.5em; margin:0; margin-bottom:0.5em" 43 43 > 44 44 <description id="scriptDescription" branches/manage-ui2/src/chrome/chromeFiles/content/manage.xul
r703 r727 10 10 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 11 11 title="&manage.title;" 12 persist="screenX screenY width height" 12 13 orient="vertical"> 13 14 … … 59 60 <button id="btnUninstall" 60 61 label="&manage.label.btnUninstall;" /> 62 <spacer flex="1"/> 63 <button label="&manage.button.close;" oncommand="close();"/> 61 64 </hbox> 62 65 </vbox> branches/manage-ui2/src/chrome/chromeFiles/content/pages-overlay.js
r699 r727 39 39 this.listbox = grpBox.getElementsByTagName("listbox")[0]; 40 40 this.btnAdd = buttons[0]; 41 this.btnRemove = buttons[1]; 41 this.btnEdit = buttons[1]; 42 this.btnRemove = buttons[2]; 42 43 43 44 this.listbox.addEventListener("select", updatePagesBox, true); 44 45 this.btnAdd.addEventListener("command", promptForNewPage, true); 46 this.btnEdit.addEventListener("command", promptForEdit, true); 45 47 this.btnRemove.addEventListener("command", remove, true); 46 48 … … 66 68 function updatePagesBox(ev) { 67 69 selectedPage = self.listbox.getSelectedItem(0); 70 self.btnEdit.disabled = selectedPage == null; 68 71 self.btnRemove.disabled = selectedPage == null; 69 72 } … … 91 94 } 92 95 } 96 97 function promptForEdit(ev) { 98 var gmManageBundle = document.getElementById("gm-manage-bundle"); 99 var val = gmPrompt( 100 gmManageBundle.getString("promptForEdit.msg"), 101 self.listbox.selectedItem.label, 102 gmManageBundle.getString("promptForEdit.title")); 103 104 if (val && val != "") { 105 self.type == "includes" ? 106 self.script.removeIncludeAt(self.listbox.selectedIndex): 107 self.script.removeExcludeAt(self.listbox.selectedIndex); 108 self.type == "includes" ? 109 self.script.addInclude(val): 110 self.script.addExclude(val); 111 112 dirty = true; 113 } 114 }; 93 115 94 116 this.pageAdded = function(val) { branches/manage-ui2/src/chrome/chromeFiles/content/pages-overlay.xul
r688 r727 25 25 label="&manage.button.add;" /> 26 26 <button 27 label="&manage.button.edit;" 28 disabled="true" /> 29 <button 27 30 label="&manage.button.remove;" 28 31 disabled="true" /> … … 45 48 <button 46 49 label="&manage.button.add;" /> 50 <button 51 label="&manage.button.edit;" 52 disabled="true" /> 47 53 <button label="&manage.button.remove;" 48 54 disabled="true" /> branches/manage-ui2/src/chrome/chromeFiles/content/utils.js
r701 r727 172 172 173 173 function launchApplicationWithDoc(appFile, docFile) { 174 var args=[docFile.path]; 175 176 // For the mac, wrap with a call to "open". 174 177 var xulRuntime = Components.classes["@mozilla.org/xre/app-info;1"] 175 178 .getService(Components.interfaces.nsIXULRuntime); 176 // See Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=411819 177 // TODO: remove this when nsIMIMEInfo works on windows again. 178 if (xulRuntime.OS.toLowerCase().substring(0, 3) == "win") { 179 var process = Components.classes["@mozilla.org/process/util;1"] 180 .createInstance(Components.interfaces.nsIProcess); 181 process.init(appFile); 182 process.run(false, // blocking 183 [docFile.path], // args 184 1); // number of args 185 } else { 186 var mimeInfoService = 187 Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"] 188 .getService(Components.interfaces.nsIMIMEService); 189 var mimeInfo = mimeInfoService.getFromTypeAndExtension( 190 "application/x-userscript+javascript", "user.js" ); 191 mimeInfo.preferredAction = mimeInfo.useHelperApp; 192 mimeInfo.preferredApplicationHandler = appFile; 193 mimeInfo.launchWithFile(docFile); 194 } 179 if ("Darwin"==xulRuntime.OS) { 180 args=["-a", appFile.path, docFile.path] 181 182 appFile = Components.classes["@mozilla.org/file/local;1"] 183 .createInstance(Components.interfaces.nsILocalFile); 184 appFile.followLinks = true; 185 appFile.initWithPath("/usr/bin/open"); 186 } 187 188 var process = Components.classes["@mozilla.org/process/util;1"] 189 .createInstance(Components.interfaces.nsIProcess); 190 process.init(appFile); 191 process.run(false, args, args.length); 195 192 } 196 193 … … 273 270 .getService(Components.interfaces.nsIIOService) 274 271 .newFileURI(file); 275 }276 277 function getContentDir() {278 var reg = Components.classes["@mozilla.org/chrome/chrome-registry;1"]279 .getService(Components.interfaces.nsIChromeRegistry);280 281 var ioSvc = Components.classes["@mozilla.org/network/io-service;1"]282 .getService(Components.interfaces.nsIIOService);283 284 var proto = Components.classes["@mozilla.org/network/protocol;1?name=file"]285 .getService(Components.interfaces.nsIFileProtocolHandler);286 287 var chromeURL = ioSvc.newURI("chrome://greasemonkey/content", null, null);288 var fileURL = reg.convertChromeURL(chromeURL);289 var file = proto.getFileFromURLSpec(fileURL.spec).parent;290 291 return file292 272 } 293 273 branches/manage-ui2/src/chrome/chromeFiles/locale/ca-AD/gm-browser.properties
r632 r727 9 9 greeting.msg=Aquest és script d'usuari de Greasemonkey. Clica instal.lar per començar a utilitzar-lo. 10 10 greeting.btn=Instal.lar 11 greeting.btnAccess=I 11 12 greetz.0=Hurrah! 12 13 greetz.1=Hola! … … 20 21 alert.failure=Error instal.lant l'script d'usuari 21 22 editor.prompt=Selecciona l'executable de l'Editor de Text (p.ex: "c:\\windows\\notepad.exe") 23 editor.please_pick_executable=Please pick an executable application to use to edit user scripts. 24 editor.could_not_launch=Could not launch editor. 22 25 newscript.noname=Si us plau, posa un nom al teu script 23 26 newscript.nonamespace=Si us plau, dona un espai de noms al teu script branches/manage-ui2/src/chrome/chromeFiles/locale/cs-CZ/gm-browser.properties
r632 r727 9 9 greeting.msg=Toto je uÅŸivatelskÜ skript rozÅ¡ÃÅenà GreaseMonkey. KlepnÄte na Instalovat pro zaÄátek jeho pouÅŸÃvánÃ. 10 10 greeting.btn=Instalovat 11 greeting.btnAccess=I 11 12 greetz.0=Hurá! 12 13 greetz.1=Nashle... … … 20 21 alert.failure=Chyba pÅi instalaci uÅŸivatelského skriptu: 21 22 editor.prompt=Vyberte textovÜ editor ke spuÅ¡tÄnà 23 editor.please_pick_executable=Please pick an executable application to use to edit user scripts. 24 editor.could_not_launch=Could not launch editor. 22 25 newscript.noname=Please provide a name for your script. 23 26 newscript.nonamespace=Please provide a namespace for your script. branches/manage-ui2/src/chrome/chromeFiles/locale/de-DE/gm-browser.properties
r632 r727 9 9 greeting.msg=Dies ist ein Benutzerskript fÃŒr Greasemonkey. Klicken Sie auf "Installieren", um es benutzen zu können. 10 10 greeting.btn=Installieren 11 greeting.btnAccess=I 11 12 greetz.0=Hossa! 12 13 greetz.1=Hallo! … … 20 21 alert.failure=Fehler bei der Installation des Benutzerskripts: 21 22 editor.prompt=Text-Editor auswÀhlen (z.B. "C:\\Windows\\notepad.exe") 23 editor.please_pick_executable=Bitte wÀhlen Sie eine ausfÃŒhrbare Anwendung zur Bearbeitung der Benutzerskripte aus. 24 editor.could_not_launch=Text-Editor konnte nicht gestartet werden. 22 25 newscript.noname=Bitte geben Sie einen Namen fÃŒr Ihr Skript an. 23 26 newscript.nonamespace=Bitte geben Sie einen Namensraum fÃŒr Ihr Skript an. branches/manage-ui2/src/chrome/chromeFiles/locale/en-US/gm-browser.properties
r629 r727 2 2 menuitem.new=New User Script 3 3 menuitem.install=Install This User Script... 4 5 4 tooltip.disabled=Greasemonkey is disabled. 6 5 tooltip.enabled=Greasemonkey is enabled. 7 6 tooltip.loading=Loading... 8 9 7 statusbar.installed=installed successfully 10 11 8 install.msg=You are about to install the following Greasemonkey user script: 12 9 greeting.msg=This is a Greasemonkey user script. Click install to start using it. 13 10 greeting.btn=Install 14 11 greeting.btnAccess=I 15 12 greetz.0=Huzzah! 16 13 greetz.1=Hallo! … … 19 16 greetz.4=Greetings, fellow traveler. 20 17 greetz.5=G'Day! 21 22 18 alert.fromURI=Downloading user script... 23 19 alert.fromURI.failure=Could not download user script 24 20 alert.success=Installed successfully. 25 21 alert.failure=Error installing user script: 26 27 22 editor.prompt=Please choose your preferred text editor first 28 23 editor.please_pick_executable=Please pick an executable application to use to edit user scripts. 29 24 editor.could_not_launch=Could not launch editor. 30 31 25 newscript.noname=Please provide a name for your script. 32 26 newscript.nonamespace=Please provide a valid namespace URI for your script.\n(e.g. "http://userscripts.org/users/useridnumber") branches/manage-ui2/src/chrome/chromeFiles/locale/en-US/gm-manage.properties
r703 r727 2 2 promptForNewPage.title=Add Page 3 3 promptForNewPage.defVal=http://foo.com/* 4 5 4 promptForEdit.msg=Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character. 6 5 promptForEdit.title=Edit Page 7 8 6 uninstallDialogTitle=Uninstall User Script 9 7 uninstallTextWithPrefs=You are about to uninstall the user script "%S".\n\nWould you also like to delete associated preferences? branches/manage-ui2/src/chrome/chromeFiles/locale/en-US/greasemonkey.dtd
r703 r727 1 1 <!ENTITY manage.title "Manage User Scripts"> 2 <!ENTITY manage.button.close "Close"> 2 3 <!ENTITY manage.button.add "Add..."> 3 4 <!ENTITY manage.button.edit "Edit..."> … … 9 10 <!ENTITY manage.label.btnUninstall "Uninstall"> 10 11 <!ENTITY manage.reorderHelp "Drag-and-drop with the mouse or press Alt-Up/Alt-Down to reorder scripts in this list."> 11 12 12 <!ENTITY menu.install "Install User Script..."> 13 13 <!ENTITY menu.install.accesskey "I"> … … 20 20 <!ENTITY menu.manage "Manage User Scripts..."> 21 21 <!ENTITY menu.manage.accesskey "M"> 22 23 <!ENTITY statusbar.noscripts "No installed scripts match this page"> 22 <!ENTITY statusbar.noscripts "No scripts installed!"> 24 23 <!ENTITY statusbar.enabled "Enabled"> 25 24 <!ENTITY statusbar.enabled.accesskey "E"> 26 27 25 <!ENTITY install.title "Greasemonkey Installation"> 28 26 <!ENTITY install.runson "runs on:"> … … 32 30 <!ENTITY install.showscriptsource "Show Script Source"> 33 31 <!ENTITY install.installbutton "Install"> 34 35 32 <!ENTITY newscript.name "Name"> 36 33 <!ENTITY newscript.namespace "Namespace"> branches/manage-ui2/src/chrome/chromeFiles/locale/es-ES/gm-browser.properties
r632 r727 9 9 greeting.msg=Esto es un Script de Greasemonkey. Pulsa instalar para su uso. 10 10 greeting.btn=Instalar 11 greeting.btnAccess=I 11 12 greetz.0=Saludos! 12 13 greetz.1=Hola! … … 20 21 alert.failure=Error instalando el Script: 21 22 editor.prompt=Elige un editor de texto (e.g. "c:\\windows\\notepad.exe") 23 editor.please_pick_executable=Please pick an executable application to use to edit user scripts. 24 editor.could_not_launch=Could not launch editor. 22 25 newscript.noname=Please provide a name for your script. 23 26 newscript.nonamespace=Please provide a namespace for your script. branches/manage-ui2/src/chrome/chromeFiles/locale/eu-ES/gm-browser.properties
r632 r727 9 9 greeting.msg=Honako hau Greasemonkey script bat da. Sakatu Instalatu erabili ahal izateko. 10 10 greeting.btn=Instalatu 11 greeting.btnAccess=I 11 12 greetz.0=Epa! 12 13 greetz.1=Aupa! … … 20 21 alert.failure=Akatsa scripta instalatzean: 21 22 editor.prompt=Hautatu testu editore bat (adb. "c:\\windows\\notepad.exe") 23 editor.please_pick_executable=Please pick an executable application to use to edit user scripts. 24 editor.could_not_launch=Could not launch editor. 22 25 newscript.noname=Please provide a name for your script. 23 26 newscript.nonamespace=Please provide a namespace for your script. branches/manage-ui2/src/chrome/chromeFiles/locale/fa-IR/gm-browser.properties
r632 r727 9 9 greeting.msg=This is a Greasemonkey user script. Click install to start using it. 10 10 greeting.btn=Install 11 greeting.btnAccess=I 11 12 greetz.0=Huzzah! 12 13 greetz.1=Hallo! … … 20 21 alert.failure=Error installing user script: 21 22 editor.prompt=Choose an Executable Text Editor (e.g. "c:\\windows\\notepad.exe") 23 editor.please_pick_executable=Please pick an executable application to use to edit user scripts. 24 editor.could_not_launch=Could not launch editor. 22 25 newscript.noname=Please provide a name for your script. 23 26 newscript.nonamespace=Please provide a namespace for your script. branches/manage-ui2/src/chrome/chromeFiles/locale/fa-IR/greasemonkey.dtd
r673 r727 20 20 <!ENTITY menu.manage "Manage User Scripts..."> 21 21 <!ENTITY menu.manage.accesskey "M"> 22 <!ENTITY statusbar.noscripts "No installed scripts match this page">22 <!ENTITY statusbar.noscripts "No scripts installed!"> 23 23 <!ENTITY statusbar.enabled "Enabled"> 24 24 <!ENTITY statusbar.enabled.accesskey "E"> branches/manage-ui2/src/chrome/chromeFiles/locale/fi-FI/gm-browser.properties
r632 r727 9 9 greeting.msg=TÀmÀ on Greasemonkey-skripti. Paina "Asenna" jatkaaksesi. 10 10 greeting.btn=Asenna 11 greeting.btnAccess=A 11 12 greetz.0=Huzzaa! 12 13 greetz.1=Moro! … … 20 21 alert.failure=Skriptin asennuksessa tapahtui virhe: 21 22 editor.prompt=Valitse tekstieditori (esim. "c:\\windows\\notepad.exe") 23 editor.please_pick_executable=Please pick an executable application to use to edit user scripts. 24 editor.could_not_launch=Could not launch editor. 22 25 newscript.noname=Anna skriptillesi nimi. 23 26 newscript.nonamespace=MÀÀritÀ skriptisi nimiavaruus. branches/manage-ui2/src/chrome/chromeFiles/locale/fr-FR/gm-browser.properties
