diff --git a/extension/chrome/content/nightly.js b/extension/chrome/content/nightly.js index 71f8003..bee7915 100644 --- a/extension/chrome/content/nightly.js +++ b/extension/chrome/content/nightly.js @@ -391,10 +391,18 @@ insertExtensions: function() { if (element) { var type = element.localName.toLowerCase(); if ((type == "input") || (type == "textarea")) { + if (type == "input") { + var extensionSeparator = ", "; + } else { + var extensionSeparator = "\n"; + } + if (nightly.preferences.prefHasUserValue("extensionSeparator")) { + extensionSeparator = nightly.preferences.getCharPref("extensionSeparator"); + } nightly.getExtensionList(function(text) { var newpos = element.selectionStart + text.length; var value = element.value; - element.value = value.substring(0, element.selectionStart) + text.join(", ") + + element.value = value.substring(0, element.selectionStart) + text.join(extensionSeparator) + value.substring(element.selectionEnd); element.selectionStart = newpos; element.selectionEnd = newpos; @@ -406,9 +414,13 @@ insertExtensions: function() { }, copyExtensions: function() { + var extensionSeparator = "\n"; + if (nightly.preferences.prefHasUserValue("extensionSeparator")) { + extensionSeparator = nightly.preferences.getCharPref("extensionSeparator"); + } nightly.getExtensionList(function(text) { if (text) - nightly.copyText(text.join(", ")); + nightly.copyText(text.join(extensionSeparator)); }); }, diff --git a/extension/defaults/preferences/nightlytools.js b/extension/defaults/preferences/nightlytools.js index ecd5fb6..6ec6a51 100644 --- a/extension/defaults/preferences/nightlytools.js +++ b/extension/defaults/preferences/nightlytools.js @@ -9,4 +9,6 @@ pref("nightly.disableCheckCompatibility", false); pref("nightly.currChangeset", ""); pref("nightly.prevChangeset", ""); +pref("nightly.extensionSeparator", ""); + pref("extensions.{8620c15f-30dc-4dba-a131-7c5d20cf4a29}.description", "chrome://nightly/locale/nightly.properties");