rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
try { languageBundle = srGetStrBundle("chrome: } catch(ex) { languageBundle = null; } if (languageBundle) { try { regionBundle = srGetStrBundle("chrome: } catch(ex) { regionBundle = null; } }
function InitLanguageMenu(curLang){ var o1 = {}; var o2 = {}; // Get the list of dictionaries from // the spellchecker. try { gSpellChecker.GetDictionaryList(o1, o2); } catch(ex) { dump("Failed to get DictionaryList!\n"); return; } var dictList = o1.value; var count = o2.value; // Load the string bundles that will help us map // RFC 1766 strings to UI strings. var languageBundle; var regionBundle; var menuStr2; var isoStrArray; var defaultIndex = 0; var langId; // Try to load the language string bundle. try { languageBundle = srGetStrBundle("chrome://global/locale/languageNames.properties"); } catch(ex) { languageBundle = null; } // If we have a language string bundle, try to load the region string bundle. if (languageBundle) { try { regionBundle = srGetStrBundle("chrome://global/locale/regionNames.properties"); } catch(ex) { regionBundle = null; } } var i; for (i = 0; i < dictList.length; i++) { try { langId = dictList[i]; isoStrArray = dictList[i].split("-"); dictList[i] = new Array(2); // first subarray element - pretty name dictList[i][1] = langId; // second subarray element - language ID if (languageBundle && isoStrArray[0]) dictList[i][0] = languageBundle.GetStringFromName(isoStrArray[0].toLowerCase()); if (regionBundle && dictList[i][0] && isoStrArray.length > 1 && isoStrArray[1]) { menuStr2 = regionBundle.GetStringFromName(isoStrArray[1].toLowerCase()); if (menuStr2) dictList[i][0] = dictList[i][0] + "/" + menuStr2; } if (!dictList[i][0]) dictList[i][0] = dictList[i][1]; } catch (ex) { // GetStringFromName throws an exception when // a key is not found in the bundle. In that // case, just use the original dictList string. dictList[i][0] = dictList[i][1]; } } // note this is not locale-aware collation, just simple ASCII-based sorting // we really need to add loacel-aware JS collation, see bug XXXXX dictList.sort(); for (i = 0; i < dictList.length; i++) { AppendLabelAndValueToMenulist(gDialog.LanguageMenulist, dictList[i][0], dictList[i][1]); if (curLang && dictList[i][1] == curLang) defaultIndex = i+2; //first two items are pre-populated and fixed } // Now make sure the correct item in the menu list is selected. if (dictList.length > 0) gDialog.LanguageMenulist.selectedIndex = defaultIndex;}
dictList[i][0] = languageBundle.GetStringFromName(isoStrArray[0].toLowerCase());
dictList[i][0] = languageBundle.getString(isoStrArray[0].toLowerCase());
function InitLanguageMenu(curLang){ var o1 = {}; var o2 = {}; // Get the list of dictionaries from // the spellchecker. try { gSpellChecker.GetDictionaryList(o1, o2); } catch(ex) { dump("Failed to get DictionaryList!\n"); return; } var dictList = o1.value; var count = o2.value; // Load the string bundles that will help us map // RFC 1766 strings to UI strings. var languageBundle; var regionBundle; var menuStr2; var isoStrArray; var defaultIndex = 0; var langId; // Try to load the language string bundle. try { languageBundle = srGetStrBundle("chrome://global/locale/languageNames.properties"); } catch(ex) { languageBundle = null; } // If we have a language string bundle, try to load the region string bundle. if (languageBundle) { try { regionBundle = srGetStrBundle("chrome://global/locale/regionNames.properties"); } catch(ex) { regionBundle = null; } } var i; for (i = 0; i < dictList.length; i++) { try { langId = dictList[i]; isoStrArray = dictList[i].split("-"); dictList[i] = new Array(2); // first subarray element - pretty name dictList[i][1] = langId; // second subarray element - language ID if (languageBundle && isoStrArray[0]) dictList[i][0] = languageBundle.GetStringFromName(isoStrArray[0].toLowerCase()); if (regionBundle && dictList[i][0] && isoStrArray.length > 1 && isoStrArray[1]) { menuStr2 = regionBundle.GetStringFromName(isoStrArray[1].toLowerCase()); if (menuStr2) dictList[i][0] = dictList[i][0] + "/" + menuStr2; } if (!dictList[i][0]) dictList[i][0] = dictList[i][1]; } catch (ex) { // GetStringFromName throws an exception when // a key is not found in the bundle. In that // case, just use the original dictList string. dictList[i][0] = dictList[i][1]; } } // note this is not locale-aware collation, just simple ASCII-based sorting // we really need to add loacel-aware JS collation, see bug XXXXX dictList.sort(); for (i = 0; i < dictList.length; i++) { AppendLabelAndValueToMenulist(gDialog.LanguageMenulist, dictList[i][0], dictList[i][1]); if (curLang && dictList[i][1] == curLang) defaultIndex = i+2; //first two items are pre-populated and fixed } // Now make sure the correct item in the menu list is selected. if (dictList.length > 0) gDialog.LanguageMenulist.selectedIndex = defaultIndex;}
menuStr2 = regionBundle.GetStringFromName(isoStrArray[1].toLowerCase());
menuStr2 = regionBundle.getString(isoStrArray[1].toLowerCase());
function InitLanguageMenu(curLang){ var o1 = {}; var o2 = {}; // Get the list of dictionaries from // the spellchecker. try { gSpellChecker.GetDictionaryList(o1, o2); } catch(ex) { dump("Failed to get DictionaryList!\n"); return; } var dictList = o1.value; var count = o2.value; // Load the string bundles that will help us map // RFC 1766 strings to UI strings. var languageBundle; var regionBundle; var menuStr2; var isoStrArray; var defaultIndex = 0; var langId; // Try to load the language string bundle. try { languageBundle = srGetStrBundle("chrome://global/locale/languageNames.properties"); } catch(ex) { languageBundle = null; } // If we have a language string bundle, try to load the region string bundle. if (languageBundle) { try { regionBundle = srGetStrBundle("chrome://global/locale/regionNames.properties"); } catch(ex) { regionBundle = null; } } var i; for (i = 0; i < dictList.length; i++) { try { langId = dictList[i]; isoStrArray = dictList[i].split("-"); dictList[i] = new Array(2); // first subarray element - pretty name dictList[i][1] = langId; // second subarray element - language ID if (languageBundle && isoStrArray[0]) dictList[i][0] = languageBundle.GetStringFromName(isoStrArray[0].toLowerCase()); if (regionBundle && dictList[i][0] && isoStrArray.length > 1 && isoStrArray[1]) { menuStr2 = regionBundle.GetStringFromName(isoStrArray[1].toLowerCase()); if (menuStr2) dictList[i][0] = dictList[i][0] + "/" + menuStr2; } if (!dictList[i][0]) dictList[i][0] = dictList[i][1]; } catch (ex) { // GetStringFromName throws an exception when // a key is not found in the bundle. In that // case, just use the original dictList string. dictList[i][0] = dictList[i][1]; } } // note this is not locale-aware collation, just simple ASCII-based sorting // we really need to add loacel-aware JS collation, see bug XXXXX dictList.sort(); for (i = 0; i < dictList.length; i++) { AppendLabelAndValueToMenulist(gDialog.LanguageMenulist, dictList[i][0], dictList[i][1]); if (curLang && dictList[i][1] == curLang) defaultIndex = i+2; //first two items are pre-populated and fixed } // Now make sure the correct item in the menu list is selected. if (dictList.length > 0) gDialog.LanguageMenulist.selectedIndex = defaultIndex;}
AppendLabelAndValueToMenulist(gDialog.LanguageMenulist, dictList[i][0], dictList[i][1]);
gDialog.LanguageMenulist.appendItem(dictList[i][0], dictList[i][1]);
function InitLanguageMenu(curLang){ var o1 = {}; var o2 = {}; // Get the list of dictionaries from // the spellchecker. try { gSpellChecker.GetDictionaryList(o1, o2); } catch(ex) { dump("Failed to get DictionaryList!\n"); return; } var dictList = o1.value; var count = o2.value; // Load the string bundles that will help us map // RFC 1766 strings to UI strings. var languageBundle; var regionBundle; var menuStr2; var isoStrArray; var defaultIndex = 0; var langId; // Try to load the language string bundle. try { languageBundle = srGetStrBundle("chrome://global/locale/languageNames.properties"); } catch(ex) { languageBundle = null; } // If we have a language string bundle, try to load the region string bundle. if (languageBundle) { try { regionBundle = srGetStrBundle("chrome://global/locale/regionNames.properties"); } catch(ex) { regionBundle = null; } } var i; for (i = 0; i < dictList.length; i++) { try { langId = dictList[i]; isoStrArray = dictList[i].split("-"); dictList[i] = new Array(2); // first subarray element - pretty name dictList[i][1] = langId; // second subarray element - language ID if (languageBundle && isoStrArray[0]) dictList[i][0] = languageBundle.GetStringFromName(isoStrArray[0].toLowerCase()); if (regionBundle && dictList[i][0] && isoStrArray.length > 1 && isoStrArray[1]) { menuStr2 = regionBundle.GetStringFromName(isoStrArray[1].toLowerCase()); if (menuStr2) dictList[i][0] = dictList[i][0] + "/" + menuStr2; } if (!dictList[i][0]) dictList[i][0] = dictList[i][1]; } catch (ex) { // GetStringFromName throws an exception when // a key is not found in the bundle. In that // case, just use the original dictList string. dictList[i][0] = dictList[i][1]; } } // note this is not locale-aware collation, just simple ASCII-based sorting // we really need to add loacel-aware JS collation, see bug XXXXX dictList.sort(); for (i = 0; i < dictList.length; i++) { AppendLabelAndValueToMenulist(gDialog.LanguageMenulist, dictList[i][0], dictList[i][1]); if (curLang && dictList[i][1] == curLang) defaultIndex = i+2; //first two items are pre-populated and fixed } // Now make sure the correct item in the menu list is selected. if (dictList.length > 0) gDialog.LanguageMenulist.selectedIndex = defaultIndex;}
var messages = GetSelectedMessages(); var numMessages = messages.length; var compositeDS = GetCompositeDataSource("MarkMessageFlagged"); var property = RDF.GetResource('http: var areMessagesFlagged = false; for(var i = 0; i < numMessages; i++) { var result = compositeDS.GetTarget(messages[i], property, true); result = result.QueryInterface(Components.interfaces.nsIRDFLiteral); if(result.Value == "flagged") { areMessagesFlagged = true; break; } }
areMessagesFlagged = SelectedMessagesAreFlagged();
function InitMarkFlaggedMenuItem(){ var messages = GetSelectedMessages(); var numMessages = messages.length; var compositeDS = GetCompositeDataSource("MarkMessageFlagged"); var property = RDF.GetResource('http://home.netscape.com/NC-rdf#Flagged'); var areMessagesFlagged = false; for(var i = 0; i < numMessages; i++) { var result = compositeDS.GetTarget(messages[i], property, true); result = result.QueryInterface(Components.interfaces.nsIRDFLiteral); if(result.Value == "flagged") { areMessagesFlagged = true; break; } } var markFlaggedMenuItem = document.getElementById("markFlaggedMenuItem"); if(markFlaggedMenuItem) markFlaggedMenuItem.setAttribute("checked", areMessagesFlagged);}
var messages = GetSelectedMessages(); var numMessages = messages.length;
function InitMarkReadMenuItem(){ var messages = GetSelectedMessages(); var numMessages = messages.length; var compositeDS = GetCompositeDataSource("MarkMessageRead"); var property = RDF.GetResource('http://home.netscape.com/NC-rdf#IsUnread'); var areMessagesRead; if(numMessages == 0) areMessagesRead = false; else { areMessagesRead = true; for(var i = 0; i < numMessages; i++) { var result = compositeDS.GetTarget(messages[i], property, true); result = result.QueryInterface(Components.interfaces.nsIRDFLiteral); if(result.Value == "true") { areMessagesRead = false; break; } } } var markReadMenuItem = document.getElementById("markReadMenuItem"); if(markReadMenuItem) markReadMenuItem.setAttribute("checked", areMessagesRead);}
var compositeDS = GetCompositeDataSource("MarkMessageRead"); var property = RDF.GetResource('http: var areMessagesRead; if(numMessages == 0) areMessagesRead = false; else { areMessagesRead = true; for(var i = 0; i < numMessages; i++) { var result = compositeDS.GetTarget(messages[i], property, true); result = result.QueryInterface(Components.interfaces.nsIRDFLiteral); if(result.Value == "true") { areMessagesRead = false; break; } } }
areMessagesRead = SelectedMessagesAreRead();
function InitMarkReadMenuItem(){ var messages = GetSelectedMessages(); var numMessages = messages.length; var compositeDS = GetCompositeDataSource("MarkMessageRead"); var property = RDF.GetResource('http://home.netscape.com/NC-rdf#IsUnread'); var areMessagesRead; if(numMessages == 0) areMessagesRead = false; else { areMessagesRead = true; for(var i = 0; i < numMessages; i++) { var result = compositeDS.GetTarget(messages[i], property, true); result = result.QueryInterface(Components.interfaces.nsIRDFLiteral); if(result.Value == "true") { areMessagesRead = false; break; } } } var markReadMenuItem = document.getElementById("markReadMenuItem"); if(markReadMenuItem) markReadMenuItem.setAttribute("checked", areMessagesRead);}
this.isContentSelected = this.isContentSelection();
initMenu : function ( popup ) { // Save menu. this.menu = popup; const xulNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; if ( document.popupNode.namespaceURI == xulNS ) { this.shouldDisplay = false; return; } // Get contextual info. this.setTarget( document.popupNode, document.popupRangeParent, document.popupRangeOffset ); this.isTextSelected = this.isTextSelection(); this.initPopupURL(); // Initialize (disable/remove) menu items. this.initItems(); },
InitMarkReadItem("markReadMenuItem"); InitMarkReadItem("markReadToolbarItem"); InitMarkFlaggedItem("markFlaggedMenuItem"); InitMarkFlaggedItem("markFlaggedToolbarItem"); document.commandDispatcher.updateCommands('create-menu-mark');
var areMessagesRead = SelectedMessagesAreRead(); var readItem = document.getElementById("cmd_markAsRead"); if(readItem) readItem.setAttribute("checked", areMessagesRead); var areMessagesFlagged = SelectedMessagesAreFlagged(); var flaggedItem = document.getElementById("cmd_markAsFlagged"); if(flaggedItem) flaggedItem.setAttribute("checked", areMessagesFlagged); document.commandDispatcher.updateCommands('create-menu-mark');
function InitMessageMark(){ InitMarkReadItem("markReadMenuItem"); InitMarkReadItem("markReadToolbarItem"); InitMarkFlaggedItem("markFlaggedMenuItem"); InitMarkFlaggedItem("markFlaggedToolbarItem"); document.commandDispatcher.updateCommands('create-menu-mark');}
var openMenu = document.getElementById("openMessageWindowMenuitem"); if (openMenu) openMenu.setAttribute("disabled", !aMessage);
function InitMessageMenu(){ var aMessage = GetFirstSelectedMessage(); var isNews = false; if(aMessage) { isNews = IsNewsMessage(aMessage); } //We show reply to Newsgroups only for news messages. var replyNewsgroupMenuItem = document.getElementById("replyNewsgroupMainMenu"); if(replyNewsgroupMenuItem) { replyNewsgroupMenuItem.setAttribute("hidden", isNews ? "" : "true"); } //For mail messages we say reply. For news we say ReplyToSender. var replyMenuItem = document.getElementById("replyMainMenu"); if(replyMenuItem) { replyMenuItem.setAttribute("hidden", !isNews ? "" : "true"); } var replySenderMenuItem = document.getElementById("replySenderMainMenu"); if(replySenderMenuItem) { replySenderMenuItem.setAttribute("hidden", isNews ? "" : "true"); } // we only kill and watch threads for news var threadMenuSeparator = document.getElementById("threadItemsSeparator"); if (threadMenuSeparator) { threadMenuSeparator.setAttribute("hidden", isNews ? "" : "true"); } var killThreadMenuItem = document.getElementById("killThread"); if (killThreadMenuItem) { killThreadMenuItem.setAttribute("hidden", isNews ? "" : "true"); } var watchThreadMenuItem = document.getElementById("watchThread"); if (watchThreadMenuItem) { watchThreadMenuItem.setAttribute("hidden", isNews ? "" : "true"); } // disable the move and copy menus if there are no messages selected. // disable the move menu if we can't delete msgs from the folder var moveMenu = document.getElementById("moveMenu"); var msgFolder = GetLoadedMsgFolder(); if(moveMenu) { var enableMenuItem = aMessage && msgFolder && msgFolder.canDeleteMessages; moveMenu.setAttribute("disabled", !enableMenuItem); } var copyMenu = document.getElementById("copyMenu"); if(copyMenu) copyMenu.setAttribute("disabled", !aMessage); // Disable Forward as/Label menu items if no message is selected var forwardAsMenu = document.getElementById("forwardAsMenu"); if(forwardAsMenu) forwardAsMenu.setAttribute("disabled", !aMessage); var labelMenu = document.getElementById("labelMenu"); if(labelMenu) labelMenu.setAttribute("disabled", !aMessage); // Disable mark menu when we're not in a folder var markMenu = document.getElementById("markMenu"); if(markMenu) markMenu.setAttribute("disabled", !msgFolder); document.commandDispatcher.updateCommands('create-menu-message');}
var replySenderAndNewsgroupMenuItem = document.getElementById("replySenderAndNewsgroupMainMenu"); if (replySenderAndNewsgroupMenuItem) replySenderAndNewsgroupMenuItem.hidden = !isNews; var replyAllMenuItem = document.getElementById("replyallMainMenu"); if (replyAllMenuItem) replyAllMenuItem.hidden = isNews; var replyAllRecipientsMenuItem = document.getElementById("replyAllRecipientsMainMenu"); if (replyAllRecipientsMenuItem) replyAllRecipientsMenuItem.hidden = !isNews;
function InitMessageMenu(){ var aMessage = GetFirstSelectedMessage(); var isNews = false; if(aMessage) { isNews = IsNewsMessage(aMessage); } //We show reply to Newsgroups only for news messages. var replyNewsgroupMenuItem = document.getElementById("replyNewsgroupMainMenu"); if(replyNewsgroupMenuItem) { replyNewsgroupMenuItem.setAttribute("hidden", isNews ? "" : "true"); } //For mail messages we say reply. For news we say ReplyToSender. var replyMenuItem = document.getElementById("replyMainMenu"); if(replyMenuItem) { replyMenuItem.setAttribute("hidden", !isNews ? "" : "true"); } var replySenderMenuItem = document.getElementById("replySenderMainMenu"); if(replySenderMenuItem) { replySenderMenuItem.setAttribute("hidden", isNews ? "" : "true"); } // we only kill and watch threads for news var threadMenuSeparator = document.getElementById("threadItemsSeparator"); if (threadMenuSeparator) { threadMenuSeparator.setAttribute("hidden", isNews ? "" : "true"); } var killThreadMenuItem = document.getElementById("killThread"); if (killThreadMenuItem) { killThreadMenuItem.setAttribute("hidden", isNews ? "" : "true"); } var watchThreadMenuItem = document.getElementById("watchThread"); if (watchThreadMenuItem) { watchThreadMenuItem.setAttribute("hidden", isNews ? "" : "true"); } // disable the move and copy menus if there are no messages selected. // disable the move menu if we can't delete msgs from the folder var moveMenu = document.getElementById("moveMenu"); var msgFolder = GetLoadedMsgFolder(); if(moveMenu) { var enableMenuItem = aMessage && msgFolder && msgFolder.canDeleteMessages; moveMenu.setAttribute("disabled", !enableMenuItem); } var copyMenu = document.getElementById("copyMenu"); if(copyMenu) copyMenu.setAttribute("disabled", !aMessage); // Disable Forward as/tag menu items if no message is selected var forwardAsMenu = document.getElementById("forwardAsMenu"); if(forwardAsMenu) forwardAsMenu.setAttribute("disabled", !aMessage); var tagMenu = document.getElementById("tagMenu"); if(tagMenu) tagMenu.setAttribute("disabled", !aMessage); // Disable mark menu when we're not in a folder var markMenu = document.getElementById("markMenu"); if(markMenu) markMenu.setAttribute("disabled", !msgFolder); document.commandDispatcher.updateCommands('create-menu-message');}
var messages = GetSelectedMessages(); var numMessages = messages.length;
var aMessage = GetSelectedMessage(0);
function InitMessageMenu(){ var messages = GetSelectedMessages(); var numMessages = messages.length; var isNews = false; if(numMessages > 0) { isNews = GetMessageType(messages[0]) == "news"; } //We show reply to Newsgroups only for news messages. var replyNewsgroupMenuItem = document.getElementById("replyNewsgroupMainMenu"); if(replyNewsgroupMenuItem) replyNewsgroupMenuItem.setAttribute("hidden", isNews ? "" : "true"); //For mail messages we say reply. For news we say ReplyToSender. var replyMenuItem = document.getElementById("replyMainMenu"); if(replyMenuItem) { replyMenuItem.setAttribute("hidden", !isNews ? "" : "true"); } var replySenderMenuItem = document.getElementById("replySenderMainMenu"); if(replySenderMenuItem) { replySenderMenuItem.setAttribute("hidden", isNews ? "" : "true"); }}
if(numMessages > 0)
if(aMessage)
function InitMessageMenu(){ var messages = GetSelectedMessages(); var numMessages = messages.length; var isNews = false; if(numMessages > 0) { isNews = GetMessageType(messages[0]) == "news"; } //We show reply to Newsgroups only for news messages. var replyNewsgroupMenuItem = document.getElementById("replyNewsgroupMainMenu"); if(replyNewsgroupMenuItem) replyNewsgroupMenuItem.setAttribute("hidden", isNews ? "" : "true"); //For mail messages we say reply. For news we say ReplyToSender. var replyMenuItem = document.getElementById("replyMainMenu"); if(replyMenuItem) { replyMenuItem.setAttribute("hidden", !isNews ? "" : "true"); } var replySenderMenuItem = document.getElementById("replySenderMainMenu"); if(replySenderMenuItem) { replySenderMenuItem.setAttribute("hidden", isNews ? "" : "true"); }}
isNews = GetMessageType(messages[0]) == "news";
isNews = GetMessageType(aMessage) == "news";
function InitMessageMenu(){ var messages = GetSelectedMessages(); var numMessages = messages.length; var isNews = false; if(numMessages > 0) { isNews = GetMessageType(messages[0]) == "news"; } //We show reply to Newsgroups only for news messages. var replyNewsgroupMenuItem = document.getElementById("replyNewsgroupMainMenu"); if(replyNewsgroupMenuItem) replyNewsgroupMenuItem.setAttribute("hidden", isNews ? "" : "true"); //For mail messages we say reply. For news we say ReplyToSender. var replyMenuItem = document.getElementById("replyMainMenu"); if(replyMenuItem) { replyMenuItem.setAttribute("hidden", !isNews ? "" : "true"); } var replySenderMenuItem = document.getElementById("replySenderMainMenu"); if(replySenderMenuItem) { replySenderMenuItem.setAttribute("hidden", isNews ? "" : "true"); }}
var moveMenu = document.getElementById("moveMenu"); if(moveMenu) moveMenu.setAttribute("disabled", !aMessage); var copyMenu = document.getElementById("copyMenu"); if(copyMenu) copyMenu.setAttribute("disabled", !aMessage);
function InitMessageMenu(){ var messages = GetSelectedMessages(); var numMessages = messages.length; var isNews = false; if(numMessages > 0) { isNews = GetMessageType(messages[0]) == "news"; } //We show reply to Newsgroups only for news messages. var replyNewsgroupMenuItem = document.getElementById("replyNewsgroupMainMenu"); if(replyNewsgroupMenuItem) replyNewsgroupMenuItem.setAttribute("hidden", isNews ? "" : "true"); //For mail messages we say reply. For news we say ReplyToSender. var replyMenuItem = document.getElementById("replyMainMenu"); if(replyMenuItem) { replyMenuItem.setAttribute("hidden", !isNews ? "" : "true"); } var replySenderMenuItem = document.getElementById("replySenderMainMenu"); if(replySenderMenuItem) { replySenderMenuItem.setAttribute("hidden", isNews ? "" : "true"); }}
function InitMessageTags(menuType)
function InitMessageTags(menuPopup)
function InitMessageTags(menuType){ var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"].getService(Components.interfaces.nsIMsgTagService); var allTags = tagService.tagEnumerator; var allKeys = tagService.keyEnumerator; // remove any existing entries... var menuItemId = menuType + "-tagpopup"; var menupopupNode = document.getElementById(menuItemId); for (var i = menupopupNode.childNodes.length - 1; i >= 0; --i) menupopupNode.removeChild(menupopupNode.childNodes[i]); // now rebuild the list var msgHdr = gDBView.hdrForFirstSelectedMessage; var curKeys = msgHdr.getStringProperty("keywords"); var newMenuItem; var curMsgHdrKeyArray = curKeys.split(" "); if (msgHdr.label != 0) curMsgHdrKeyArray.push("$label" + msgHdr.label); while (allTags.hasMore()) { var tag = allTags.getNext(); var key = allKeys.getNext(); // TODO we want to either remove or "check" the tags that already exist newMenuItem = document.createElement('menuitem'); newMenuItem.setAttribute('label', tag); newMenuItem.setAttribute('value', key); newMenuItem.setAttribute('type', 'checkbox'); var keySet = false; for ( var index = 0; index < curMsgHdrKeyArray.length; index++ ) { if (key == curMsgHdrKeyArray[index]) { keySet = true; break; } } // if we already have this tag, we should change the command to "UnTag" var command = ((keySet) ? "Un" : "") + "TagCurMessage(" + "'" + key + "');"; newMenuItem.setAttribute('oncommand', command); newMenuItem.setAttribute('checked', keySet); menupopupNode.appendChild(newMenuItem); } var menuseparator = document.createElement('menuseparator'); menupopupNode.appendChild(menuseparator); newMenuItem = document.createElement('menuitem'); newMenuItem.setAttribute('label', gMessengerBundle.getString("newTag")); newMenuItem.setAttribute('oncommand', "AddTag()"); menupopupNode.appendChild(newMenuItem);}
var menuItemId = menuType + "-tagpopup"; var menupopupNode = document.getElementById(menuItemId); for (var i = menupopupNode.childNodes.length - 1; i >= 0; --i) menupopupNode.removeChild(menupopupNode.childNodes[i]);
while (menuPopup.firstChild && menuPopup.firstChild.localName != 'menuseparator') menuPopup.removeChild(menuPopup.firstChild); var menuSeparatorNode = menuPopup.firstChild;
function InitMessageTags(menuType){ var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"].getService(Components.interfaces.nsIMsgTagService); var allTags = tagService.tagEnumerator; var allKeys = tagService.keyEnumerator; // remove any existing entries... var menuItemId = menuType + "-tagpopup"; var menupopupNode = document.getElementById(menuItemId); for (var i = menupopupNode.childNodes.length - 1; i >= 0; --i) menupopupNode.removeChild(menupopupNode.childNodes[i]); // now rebuild the list var msgHdr = gDBView.hdrForFirstSelectedMessage; var curKeys = msgHdr.getStringProperty("keywords"); var newMenuItem; var curMsgHdrKeyArray = curKeys.split(" "); if (msgHdr.label != 0) curMsgHdrKeyArray.push("$label" + msgHdr.label); while (allTags.hasMore()) { var tag = allTags.getNext(); var key = allKeys.getNext(); // TODO we want to either remove or "check" the tags that already exist newMenuItem = document.createElement('menuitem'); newMenuItem.setAttribute('label', tag); newMenuItem.setAttribute('value', key); newMenuItem.setAttribute('type', 'checkbox'); var keySet = false; for ( var index = 0; index < curMsgHdrKeyArray.length; index++ ) { if (key == curMsgHdrKeyArray[index]) { keySet = true; break; } } // if we already have this tag, we should change the command to "UnTag" var command = ((keySet) ? "Un" : "") + "TagCurMessage(" + "'" + key + "');"; newMenuItem.setAttribute('oncommand', command); newMenuItem.setAttribute('checked', keySet); menupopupNode.appendChild(newMenuItem); } var menuseparator = document.createElement('menuseparator'); menupopupNode.appendChild(menuseparator); newMenuItem = document.createElement('menuitem'); newMenuItem.setAttribute('label', gMessengerBundle.getString("newTag")); newMenuItem.setAttribute('oncommand', "AddTag()"); menupopupNode.appendChild(newMenuItem);}
menupopupNode.appendChild(newMenuItem);
menuPopup.insertBefore(newMenuItem, menuSeparatorNode);
function InitMessageTags(menuType){ var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"].getService(Components.interfaces.nsIMsgTagService); var allTags = tagService.tagEnumerator; var allKeys = tagService.keyEnumerator; // remove any existing entries... var menuItemId = menuType + "-tagpopup"; var menupopupNode = document.getElementById(menuItemId); for (var i = menupopupNode.childNodes.length - 1; i >= 0; --i) menupopupNode.removeChild(menupopupNode.childNodes[i]); // now rebuild the list var msgHdr = gDBView.hdrForFirstSelectedMessage; var curKeys = msgHdr.getStringProperty("keywords"); var newMenuItem; var curMsgHdrKeyArray = curKeys.split(" "); if (msgHdr.label != 0) curMsgHdrKeyArray.push("$label" + msgHdr.label); while (allTags.hasMore()) { var tag = allTags.getNext(); var key = allKeys.getNext(); // TODO we want to either remove or "check" the tags that already exist newMenuItem = document.createElement('menuitem'); newMenuItem.setAttribute('label', tag); newMenuItem.setAttribute('value', key); newMenuItem.setAttribute('type', 'checkbox'); var keySet = false; for ( var index = 0; index < curMsgHdrKeyArray.length; index++ ) { if (key == curMsgHdrKeyArray[index]) { keySet = true; break; } } // if we already have this tag, we should change the command to "UnTag" var command = ((keySet) ? "Un" : "") + "TagCurMessage(" + "'" + key + "');"; newMenuItem.setAttribute('oncommand', command); newMenuItem.setAttribute('checked', keySet); menupopupNode.appendChild(newMenuItem); } var menuseparator = document.createElement('menuseparator'); menupopupNode.appendChild(menuseparator); newMenuItem = document.createElement('menuitem'); newMenuItem.setAttribute('label', gMessengerBundle.getString("newTag")); newMenuItem.setAttribute('oncommand', "AddTag()"); menupopupNode.appendChild(newMenuItem);}
var menuseparator = document.createElement('menuseparator'); menupopupNode.appendChild(menuseparator); newMenuItem = document.createElement('menuitem'); newMenuItem.setAttribute('label', gMessengerBundle.getString("newTag")); newMenuItem.setAttribute('oncommand', "AddTag()"); menupopupNode.appendChild(newMenuItem);
function InitMessageTags(menuType){ var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"].getService(Components.interfaces.nsIMsgTagService); var allTags = tagService.tagEnumerator; var allKeys = tagService.keyEnumerator; // remove any existing entries... var menuItemId = menuType + "-tagpopup"; var menupopupNode = document.getElementById(menuItemId); for (var i = menupopupNode.childNodes.length - 1; i >= 0; --i) menupopupNode.removeChild(menupopupNode.childNodes[i]); // now rebuild the list var msgHdr = gDBView.hdrForFirstSelectedMessage; var curKeys = msgHdr.getStringProperty("keywords"); var newMenuItem; var curMsgHdrKeyArray = curKeys.split(" "); if (msgHdr.label != 0) curMsgHdrKeyArray.push("$label" + msgHdr.label); while (allTags.hasMore()) { var tag = allTags.getNext(); var key = allKeys.getNext(); // TODO we want to either remove or "check" the tags that already exist newMenuItem = document.createElement('menuitem'); newMenuItem.setAttribute('label', tag); newMenuItem.setAttribute('value', key); newMenuItem.setAttribute('type', 'checkbox'); var keySet = false; for ( var index = 0; index < curMsgHdrKeyArray.length; index++ ) { if (key == curMsgHdrKeyArray[index]) { keySet = true; break; } } // if we already have this tag, we should change the command to "UnTag" var command = ((keySet) ? "Un" : "") + "TagCurMessage(" + "'" + key + "');"; newMenuItem.setAttribute('oncommand', command); newMenuItem.setAttribute('checked', keySet); menupopupNode.appendChild(newMenuItem); } var menuseparator = document.createElement('menuseparator'); menupopupNode.appendChild(menuseparator); newMenuItem = document.createElement('menuitem'); newMenuItem.setAttribute('label', gMessengerBundle.getString("newTag")); newMenuItem.setAttribute('oncommand', "AddTag()"); menupopupNode.appendChild(newMenuItem);}
if (msgHdr.label != 0) curMsgHdrKeyArray.push("$label" + msgHdr.label);
function InitMessageTags(menuType){ var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"].getService(Components.interfaces.nsIMsgTagService); var allTags = tagService.tagEnumerator; var allKeys = tagService.keyEnumerator; // remove any existing entries... var menuItemId = menuType + "-tagpopup"; var menupopupNode = document.getElementById(menuItemId); for (var i = menupopupNode.childNodes.length - 1; i >= 0; --i) menupopupNode.removeChild(menupopupNode.childNodes[i]); // now rebuild the list var msgHdr = gDBView.hdrForFirstSelectedMessage; var curKeys = msgHdr.getStringProperty("keywords"); var newMenuItem; var curMsgHdrKeyArray = curKeys.split(" "); while (allTags.hasMore()) { var tag = allTags.getNext(); var key = allKeys.getNext(); // TODO we want to either remove or "check" the tags that already exist newMenuItem = document.createElement('menuitem'); newMenuItem.setAttribute('label', tag); newMenuItem.setAttribute('value', key); newMenuItem.setAttribute('type', 'checkbox'); var keySet = false; for ( var index = 0; index < curMsgHdrKeyArray.length; index++ ) { if (key == curMsgHdrKeyArray[index]) { keySet = true; break; } } // if we already have this tag, we should change the command to "UnTag" var command = ((keySet) ? "Un" : "") + "TagCurMessage(" + "'" + key + "');"; newMenuItem.setAttribute('oncommand', command); newMenuItem.setAttribute('checked', keySet); menupopupNode.appendChild(newMenuItem); } var menuseparator = document.createElement('menuseparator'); menupopupNode.appendChild(menuseparator); newMenuItem = document.createElement('menuitem'); newMenuItem.setAttribute('label', gMessengerBundle.getString("newTag")); newMenuItem.setAttribute('oncommand', "AddTag()"); menupopupNode.appendChild(newMenuItem);}
this.showItem( "context-bookmarkpage", !( this.isTextSelected || this.onTextInput || this.onLink ) );
this.showItem( "context-bookmarkpage", !( this.isTextSelected || this.onTextInput || this.onLink || this.onImage ) );
initMiscItems : function () { // Use "Bookmark This Link" if on a link. this.showItem( "context-bookmarkpage", !( this.isTextSelected || this.onTextInput || this.onLink ) ); this.showItem( "context-bookmarklink", this.onLink && !this.onMailtoLink ); this.showItem( "context-searchselect", this.isTextSelected ); this.showItem( "context-keywordfield", this.onTextInput && this.onKeywordField ); this.showItem( "frame", this.inFrame ); this.showItem( "frame-sep", this.inFrame ); this.showItem( "context-blockimage", this.onImage); if (this.onImage) { var blockImage = document.getElementById("context-blockimage"); var uri = Components.classes['@mozilla.org/network/standard-url;1'].createInstance(Components.interfaces.nsIURI); uri.spec = this.imageURL; var shortenedUriHost = uri.host.replace(/^www\./i,""); if (shortenedUriHost.length > 15) shortenedUriHost = shortenedUriHost.substr(0,15) + "..."; blockImage.label = gNavigatorBundle.getFormattedString ("blockImages", [shortenedUriHost]); if (this.isImageBlocked()) { blockImage.setAttribute("checked", "true"); } else blockImage.removeAttribute("checked"); } },
this.showItem( "context-searchselect", this.isTextSelected );
this.showItem( "context-searchselect", this.isTextSelected && !this.onTextInput );
initMiscItems : function () { // Use "Bookmark This Link" if on a link. this.showItem( "context-bookmarkpage", !( this.isTextSelected || this.onTextInput ) ); this.showItem( "context-bookmarklink", this.onLink && !this.onMailtoLink ); this.showItem( "context-searchselect", this.isTextSelected ); this.showItem( "frame", this.inFrame ); this.showItem( "frame-sep", this.inFrame ); var blocking = true; if (this.popupURL) try { const PM = Components.classes["@mozilla.org/PopupWindowManager;1"] .getService(Components.interfaces.nsIPopupWindowManager); blocking = PM.testPermission(this.popupURL) == Components.interfaces.nsIPopupWindowManager.DENY_POPUP; } catch (e) { } this.showItem( "popupwindow-reject", this.popupURL && !blocking); this.showItem( "popupwindow-allow", this.popupURL && blocking); this.showItem( "context-sep-popup", this.popupURL); },
if (this.inFrame) goSetMenuValue( "saveframeas", this.autoDownload ? "valueSave" : "valueSaveAs" );
initMiscItems : function () { // Use "Bookmark This Link" if on a link. this.showItem( "context-bookmarkpage", !( this.isTextSelected || this.onTextInput || this.onStandaloneImage ) ); this.showItem( "context-bookmarklink", this.onLink && !this.onMailtoLink ); this.showItem( "context-searchselect", this.isTextSelected && !this.onTextInput ); this.showItem( "frame", this.inFrame ); this.showItem( "frame-sep", this.inFrame ); var blocking = true; if (this.popupURL) try { const PM = Components.classes["@mozilla.org/PopupWindowManager;1"] .getService(Components.interfaces.nsIPopupWindowManager); blocking = PM.testPermission(this.popupURL) == Components.interfaces.nsIPopupWindowManager.DENY_POPUP; } catch (e) { } this.showItem( "popupwindow-reject", this.popupURL && !blocking); this.showItem( "popupwindow-allow", this.popupURL && blocking); this.showItem( "context-sep-popup", this.popupURL); // BiDi UI this.showItem( "context-sep-bidi", gShowBiDi); this.showItem( "context-bidi-text-direction-toggle", this.onTextInput && gShowBiDi); this.showItem( "context-bidi-page-direction-toggle", !this.onTextInput && gShowBiDi); },
this.showItem( "context-bookmarkpage", !( this.isTextSelected || this.onTextInput || this.onStandaloneImage ) );
this.showItem( "context-bookmarkpage", !( this.isContentSelected || this.onTextInput || this.onStandaloneImage ) );
initMiscItems : function () { // Use "Bookmark This Link" if on a link. this.showItem( "context-bookmarkpage", !( this.isTextSelected || this.onTextInput || this.onStandaloneImage ) ); this.showItem( "context-bookmarklink", this.onLink && !this.onMailtoLink ); this.showItem( "context-searchselect", this.isTextSelected && !this.onTextInput ); this.showItem( "frame", this.inFrame ); this.showItem( "frame-sep", this.inFrame ); if (this.inFrame) goSetMenuValue( "saveframeas", this.autoDownload ? "valueSave" : "valueSaveAs" ); var blocking = true; if (this.popupURL) try { const PM = Components.classes["@mozilla.org/PopupWindowManager;1"] .getService(Components.interfaces.nsIPopupWindowManager); blocking = PM.testPermission(this.popupURL) == Components.interfaces.nsIPopupWindowManager.DENY_POPUP; } catch (e) { } this.showItem( "popupwindow-reject", this.popupURL && !blocking); this.showItem( "popupwindow-allow", this.popupURL && blocking); this.showItem( "context-sep-popup", this.popupURL); // BiDi UI this.showItem( "context-sep-bidi", gShowBiDi); this.showItem( "context-bidi-text-direction-toggle", this.onTextInput && gShowBiDi); this.showItem( "context-bidi-page-direction-toggle", !this.onTextInput && gShowBiDi); },
this.showItem( "context-searchselect", this.isTextSelected() );
initMiscItems : function () { // Use "Bookmark This Link" if on a link. this.showItem( "context-bookmarkpage", !this.onLink ); this.showItem( "context-bookmarklink", this.onLink ); // Send Page not working yet. this.showItem( "context-sendpage", false ); },
munger.addRule("talkback-link", /(?:\W|^)(TB\d+[A-Z]?)(?:\W|$)/,
munger.addRule("talkback-link", /(?:\W|^)(TB\d{8,}[A-Z]?)(?:\W|$)/,
function initMunger(){ /* linkRE: the general URL linkifier regular expression: * * - start with whitespace, non-word, or begining-of-line * - then match: * - EITHER scheme (word + hyphen), colon, then lots of non-whitespace * - OR "www" followed by at least 2 sets of: * - "." plus some non-whitespace, non-"." characters * - must end match with a word-break * - include a "/" or "=" beyond break if present * - end with whitespace, non-word, or end-of-line */ client.linkRE = /(?:\s|\W|^)((?:(\w[\w-]+):[^\s]+|www(\.[^.\s]+){2,})\b[\/=]?)(?:\s|\W|$)/; var munger = client.munger = new CMunger(); // Special internal munger! munger.addRule (".inline-buttons", /(\[\[.*?\]\])/, insertInlineButton, false); munger.addRule ("quote", /(``|'')/, insertQuote); munger.addRule ("bold", /(?:\s|^)(\*[^*()]*\*)(?:[\s.,]|$)/, "chatzilla-bold"); munger.addRule ("underline", /(?:\s|^)(\_[^_()]*\_)(?:[\s.,]|$)/, "chatzilla-underline"); munger.addRule ("italic", /(?:\s|^)(\/[^\/()]*\/)(?:[\s.,]|$)/, "chatzilla-italic"); /* allow () chars inside |code()| blocks */ munger.addRule ("teletype", /(?:\s|^)(\|[^|]*\|)(?:[\s.,]|$)/, "chatzilla-teletype"); munger.addRule (".mirc-colors", /(\x03((\d{1,2})(,\d{1,2}|)|))/, mircChangeColor); munger.addRule (".mirc-bold", /(\x02)/, mircToggleBold); munger.addRule (".mirc-underline", /(\x1f)/, mircToggleUnder); munger.addRule (".mirc-color-reset", /(\x0f)/, mircResetColor); munger.addRule (".mirc-reverse", /(\x16)/, mircReverseColor); munger.addRule ("ctrl-char", /([\x01-\x1f])/, showCtrlChar); munger.addRule ("link", client.linkRE, insertLink); munger.addRule ("mailto", /(?:\s|\W|^)((mailto:)?[^<>\[\]()\'\"\s\u201d]+@[^.<>\[\]()\'\"\s\u201d]+\.[^<>\[\]()\'\"\s\u201d]+)/i, insertMailToLink); munger.addRule ("bugzilla-link", /(?:\s|\W|^)(bug\s+(?:#?\d{3,6}|#[^\s,]{1,20}))/i, insertBugzillaLink); munger.addRule ("channel-link", /(?:\s|\W|^)[@+]?(#[^<>\[\](){}\"\s\u201d]*[^:,.<>\[\](){}\'\"\s\u201d])/i, insertChannelLink); munger.addRule("talkback-link", /(?:\W|^)(TB\d+[A-Z]?)(?:\W|$)/, insertTalkbackLink); munger.addRule ("face", /((^|\s)(?:[>]?[B8=:;(xX][~']?[-^v"]?(?:[)|(PpSs0oO\?\[\]\/\\]|D+)|>[-^v]?\)|[oO9][._][oO9])(\s|$))/, insertSmiley); munger.addRule ("rheet", /(?:\s|\W|^)(rhee+t\!*)(?:\s|$)/i, insertRheet); munger.addRule ("word-hyphenator", new RegExp ("(\\S{" + client.MAX_WORD_DISPLAY + ",})"), insertHyphenatedWord); client.enableColors = client.prefs["munger.colorCodes"]; for (var entry in client.munger.entries) { var branch = client.prefManager.prefBranch; if (entry[0] != ".") { try { munger.entries[entry].enabled = branch.getBoolPref("munger." + entry); } catch (ex) { // nada } } }}
this.showItem( "context-sep-stop", !( this.isTextSelected || this.onLink || this.onTextInput ) );
this.showItem( "context-sep-stop", !( this.isTextSelected || this.onLink || this.onTextInput || this.onImage ) );
initNavigationItems : function () { // Back determined by canGoBack broadcaster. this.setItemAttrFromNode( "context-back", "disabled", "canGoBack" ); // Forward determined by canGoForward broadcaster. this.setItemAttrFromNode( "context-forward", "disabled", "canGoForward" ); this.showItem( "context-back", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-forward", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-reload", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-stop", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-sep-stop", !( this.isTextSelected || this.onLink || this.onTextInput ) ); // XXX: Stop is determined in navigator.js; the canStop broadcaster is broken //this.setItemAttrFromNode( "context-stop", "disabled", "canStop" ); },
this.showItem( "context-back", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-forward", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) );
this.showItem( "context-back", showNav ); this.showItem( "context-forward", showNav );
initNavigationItems : function () { // Back determined by canGoBack broadcaster. this.setItemAttrFromNode( "context-back", "disabled", "canGoBack" ); // Forward determined by canGoForward broadcaster. this.setItemAttrFromNode( "context-forward", "disabled", "canGoForward" ); this.showItem( "context-back", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-forward", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-reload", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-stop", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-sep-stop", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); // XXX: Stop is determined in navigator.js; the canStop broadcaster is broken //this.setItemAttrFromNode( "context-stop", "disabled", "canStop" ); },
this.showItem( "context-reload", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) );
this.showItem( "context-reload", showNav );
initNavigationItems : function () { // Back determined by canGoBack broadcaster. this.setItemAttrFromNode( "context-back", "disabled", "canGoBack" ); // Forward determined by canGoForward broadcaster. this.setItemAttrFromNode( "context-forward", "disabled", "canGoForward" ); this.showItem( "context-back", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-forward", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-reload", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-stop", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-sep-stop", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); // XXX: Stop is determined in navigator.js; the canStop broadcaster is broken //this.setItemAttrFromNode( "context-stop", "disabled", "canStop" ); },
this.showItem( "context-stop", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-sep-stop", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) );
this.showItem( "context-stop", showNav ); this.showItem( "context-sep-stop", showNav );
initNavigationItems : function () { // Back determined by canGoBack broadcaster. this.setItemAttrFromNode( "context-back", "disabled", "canGoBack" ); // Forward determined by canGoForward broadcaster. this.setItemAttrFromNode( "context-forward", "disabled", "canGoForward" ); this.showItem( "context-back", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-forward", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-reload", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-stop", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); this.showItem( "context-sep-stop", !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ) ); // XXX: Stop is determined in navigator.js; the canStop broadcaster is broken //this.setItemAttrFromNode( "context-stop", "disabled", "canStop" ); },
var showNav = !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput );
var showNav = !( this.isContentSelected || this.onLink || this.onImage || this.onTextInput );
initNavigationItems : function () { // Back determined by canGoBack broadcaster. this.setItemAttrFromNode( "context-back", "disabled", "canGoBack" ); // Forward determined by canGoForward broadcaster. this.setItemAttrFromNode( "context-forward", "disabled", "canGoForward" ); var showNav = !( this.isTextSelected || this.onLink || this.onImage || this.onTextInput ); this.showItem( "context-back", showNav ); this.showItem( "context-forward", showNav ); this.showItem( "context-reload", showNav ); this.showItem( "context-stop", showNav ); this.showItem( "context-sep-stop", showNav ); // XXX: Stop is determined in navigator.js; the canStop broadcaster is broken //this.setItemAttrFromNode( "context-stop", "disabled", "canStop" ); },
this.showItem( "context-openlink", this.onSaveableLink || ( this.inDirList && this.onLink ) ); this.showItem( "context-openlinkintab", this.onSaveableLink || ( this.inDirList && this.onLink ) );
var showOpen = this.onSaveableLink || ( this.inDirList && this.onLink );
initOpenItems : function () { this.showItem( "context-openlink", this.onSaveableLink || ( this.inDirList && this.onLink ) ); this.showItem( "context-openlinkintab", this.onSaveableLink || ( this.inDirList && this.onLink ) ); this.showItem( "context-sep-open", this.onSaveableLink || ( this.inDirList && this.onLink ) ); },
this.showItem( "context-sep-open", this.onSaveableLink || ( this.inDirList && this.onLink ) );
this.showItem( "context-openlink", showOpen ); this.showItem( "context-openlinkintab", showOpen ); this.showItem( "context-sep-open", showOpen );
initOpenItems : function () { this.showItem( "context-openlink", this.onSaveableLink || ( this.inDirList && this.onLink ) ); this.showItem( "context-openlinkintab", this.onSaveableLink || ( this.inDirList && this.onLink ) ); this.showItem( "context-sep-open", this.onSaveableLink || ( this.inDirList && this.onLink ) ); },
this.showItem( "context-showonlythisframe", this.inFrame );
initOpenItems : function () { // Remove open/edit link if not applicable. this.showItem( "context-openlink", this.onSaveableLink || ( this.inDirList && this.onLink ) ); this.showItem( "context-editlink", this.onSaveableLink && !this.inDirList ); // Remove open frame if not applicable. this.showItem( "context-openframe", this.inFrame ); // Remove separator after open items if neither link nor frame. this.showItem( "context-sep-open", this.onSaveableLink || ( this.inDirList && this.onLink ) || this.inFrame ); },
else queuedTag = aPageTag;
else { dump("*** queueing up a panel...\n"); queuedTag = aPrefTag; }
function initPanel ( aPrefTag ) { if( hPrefWindow ) hPrefWindow.onpageload( aPrefTag ) else queuedTag = aPageTag; }
queuedTag = aPrefTag;
window.queuedTag = aPrefTag;
function initPanel ( aPrefTag ) { if( hPrefWindow ) hPrefWindow.onpageload( aPrefTag ) else { dump("*** queueing up a panel...\n"); queuedTag = aPrefTag; } }
top.controllers.appendController(DefaultController); SetupCommandUpdateHandlers();
function InitPanes(){ var mailsidebar = new Object mailsidebar.db = 'chrome://messenger/content/sidebar-messenger.rdf' mailsidebar.resource = 'NC:MessengerSidebarRoot' var threadTree = GetThreadTree(); if(threadTree); OnLoadThreadPane(threadTree); var folderTree = GetFolderTree(); if(folderTree) OnLoadFolderPane(folderTree);}
var element = document.getElementById("PhoneticLastName"); element.setAttribute("hidden", "false"); element = document.getElementById("PhoneticLabel1"); element.setAttribute("hidden", "false"); element = document.getElementById("PhoneticSpacer1"); element.setAttribute("hidden", "false"); element = document.getElementById("PhoneticFirstName"); element.setAttribute("hidden", "false"); element = document.getElementById("PhoneticLabel2"); element.setAttribute("hidden", "false"); element = document.getElementById("PhoneticSpacer2"); element.setAttribute("hidden", "false");
for (var i = kPhoneticFields.length; i-- > 0; ) document.getElementById(kPhoneticFields[i]).hidden = false;
function InitPhoneticFields(){ var showPhoneticFields = gPrefs.getComplexValue("mail.addr_book.show_phonetic_fields", Components.interfaces.nsIPrefLocalizedString).data; // hide phonetic fields if indicated by the pref if (showPhoneticFields == "true") { var element = document.getElementById("PhoneticLastName"); element.setAttribute("hidden", "false"); element = document.getElementById("PhoneticLabel1"); element.setAttribute("hidden", "false"); element = document.getElementById("PhoneticSpacer1"); element.setAttribute("hidden", "false"); element = document.getElementById("PhoneticFirstName"); element.setAttribute("hidden", "false"); element = document.getElementById("PhoneticLabel2"); element.setAttribute("hidden", "false"); element = document.getElementById("PhoneticSpacer2"); element.setAttribute("hidden", "false"); }}
var percentIndex = size.search(/%/); var pxIndex = size.search(/px/); if (percentIndex > 0)
if (/%/.test(size))
function InitPixelOrPercentMenulist(elementForAtt, elementInDoc, attribute, menulistID, defaultIndex){ if (!defaultIndex) defaultIndex = gPixel; // var size = elementForAtt.getAttribute(attribute); var size = GetHTMLOrCSSStyleValue(elementForAtt, attribute, attribute) var menulist = document.getElementById(menulistID); var pixelItem; var percentItem; if (!menulist) { dump("NO MENULIST found for ID="+menulistID+"\n"); return size; } ClearMenulist(menulist); pixelItem = AppendStringToMenulist(menulist, GetString("Pixels")); if (!pixelItem) return 0; percentItem = AppendStringToMenulist(menulist, GetAppropriatePercentString(elementForAtt, elementInDoc)); if (size && size.length > 0) { // Search for a "%" or "px" var percentIndex = size.search(/%/); var pxIndex = size.search(/px/); if (percentIndex > 0) { // Strip out the % size = size.substr(0, percentIndex); if (percentItem) menulist.selectedItem = percentItem; } else if (pxIndex > 0) { // Strip out the % size = size.substr(0, pxIndex); menulist.selectedItem = pixelItem; } else menulist.selectedItem = pixelItem; } else menulist.selectedIndex = defaultIndex; return size;}
size = size.substr(0, percentIndex);
size = RegExp.leftContext;
function InitPixelOrPercentMenulist(elementForAtt, elementInDoc, attribute, menulistID, defaultIndex){ if (!defaultIndex) defaultIndex = gPixel; // var size = elementForAtt.getAttribute(attribute); var size = GetHTMLOrCSSStyleValue(elementForAtt, attribute, attribute) var menulist = document.getElementById(menulistID); var pixelItem; var percentItem; if (!menulist) { dump("NO MENULIST found for ID="+menulistID+"\n"); return size; } ClearMenulist(menulist); pixelItem = AppendStringToMenulist(menulist, GetString("Pixels")); if (!pixelItem) return 0; percentItem = AppendStringToMenulist(menulist, GetAppropriatePercentString(elementForAtt, elementInDoc)); if (size && size.length > 0) { // Search for a "%" or "px" var percentIndex = size.search(/%/); var pxIndex = size.search(/px/); if (percentIndex > 0) { // Strip out the % size = size.substr(0, percentIndex); if (percentItem) menulist.selectedItem = percentItem; } else if (pxIndex > 0) { // Strip out the % size = size.substr(0, pxIndex); menulist.selectedItem = pixelItem; } else menulist.selectedItem = pixelItem; } else menulist.selectedIndex = defaultIndex; return size;}
else if (pxIndex > 0)
else
function InitPixelOrPercentMenulist(elementForAtt, elementInDoc, attribute, menulistID, defaultIndex){ if (!defaultIndex) defaultIndex = gPixel; // var size = elementForAtt.getAttribute(attribute); var size = GetHTMLOrCSSStyleValue(elementForAtt, attribute, attribute) var menulist = document.getElementById(menulistID); var pixelItem; var percentItem; if (!menulist) { dump("NO MENULIST found for ID="+menulistID+"\n"); return size; } ClearMenulist(menulist); pixelItem = AppendStringToMenulist(menulist, GetString("Pixels")); if (!pixelItem) return 0; percentItem = AppendStringToMenulist(menulist, GetAppropriatePercentString(elementForAtt, elementInDoc)); if (size && size.length > 0) { // Search for a "%" or "px" var percentIndex = size.search(/%/); var pxIndex = size.search(/px/); if (percentIndex > 0) { // Strip out the % size = size.substr(0, percentIndex); if (percentItem) menulist.selectedItem = percentItem; } else if (pxIndex > 0) { // Strip out the % size = size.substr(0, pxIndex); menulist.selectedItem = pixelItem; } else menulist.selectedItem = pixelItem; } else menulist.selectedIndex = defaultIndex; return size;}
size = size.substr(0, pxIndex);
if (/px/.test(size)) size = RegExp.leftContext;
function InitPixelOrPercentMenulist(elementForAtt, elementInDoc, attribute, menulistID, defaultIndex){ if (!defaultIndex) defaultIndex = gPixel; // var size = elementForAtt.getAttribute(attribute); var size = GetHTMLOrCSSStyleValue(elementForAtt, attribute, attribute) var menulist = document.getElementById(menulistID); var pixelItem; var percentItem; if (!menulist) { dump("NO MENULIST found for ID="+menulistID+"\n"); return size; } ClearMenulist(menulist); pixelItem = AppendStringToMenulist(menulist, GetString("Pixels")); if (!pixelItem) return 0; percentItem = AppendStringToMenulist(menulist, GetAppropriatePercentString(elementForAtt, elementInDoc)); if (size && size.length > 0) { // Search for a "%" or "px" var percentIndex = size.search(/%/); var pxIndex = size.search(/px/); if (percentIndex > 0) { // Strip out the % size = size.substr(0, percentIndex); if (percentItem) menulist.selectedItem = percentItem; } else if (pxIndex > 0) { // Strip out the % size = size.substr(0, pxIndex); menulist.selectedItem = pixelItem; } else menulist.selectedItem = pixelItem; } else menulist.selectedIndex = defaultIndex; return size;}
else menulist.selectedItem = pixelItem;
function InitPixelOrPercentMenulist(elementForAtt, elementInDoc, attribute, menulistID, defaultIndex){ if (!defaultIndex) defaultIndex = gPixel; // var size = elementForAtt.getAttribute(attribute); var size = GetHTMLOrCSSStyleValue(elementForAtt, attribute, attribute) var menulist = document.getElementById(menulistID); var pixelItem; var percentItem; if (!menulist) { dump("NO MENULIST found for ID="+menulistID+"\n"); return size; } ClearMenulist(menulist); pixelItem = AppendStringToMenulist(menulist, GetString("Pixels")); if (!pixelItem) return 0; percentItem = AppendStringToMenulist(menulist, GetAppropriatePercentString(elementForAtt, elementInDoc)); if (size && size.length > 0) { // Search for a "%" or "px" var percentIndex = size.search(/%/); var pxIndex = size.search(/px/); if (percentIndex > 0) { // Strip out the % size = size.substr(0, percentIndex); if (percentItem) menulist.selectedItem = percentItem; } else if (pxIndex > 0) { // Strip out the % size = size.substr(0, pxIndex); menulist.selectedItem = pixelItem; } else menulist.selectedItem = pixelItem; } else menulist.selectedIndex = defaultIndex; return size;}
return;
initPopupURL: function() { return; // remove this line to reenable the context menu // quick check: if no opener, it can't be a popup if (!window.content.opener) return; try { var show = false; // is it a popup window? const CI = Components.interfaces; var xulwin = window .QueryInterface(CI.nsIInterfaceRequestor) .getInterface(CI.nsIWebNavigation) .QueryInterface(CI.nsIDocShellTreeItem) .treeOwner .QueryInterface(CI.nsIInterfaceRequestor) .getInterface(CI.nsIXULWindow); if (xulwin.contextFlags & CI.nsIWindowCreator2.PARENT_IS_LOADING_OR_RUNNING_TIMEOUT) { // do the pref settings allow site-by-site popup management? const PB = Components.classes["@mozilla.org/preferences-service;1"] .getService(CI.nsIPrefBranch); show = !PB.getBoolPref("dom.disable_open_during_load") && PB.getIntPref("privacy.popups.policy") == CI.nsIPopupWindowManager.ALLOW_POPUP && PB.getBoolPref("privacy.popups.usecustom"); } if (show) { // initialize popupURL const IOS = Components.classes["@mozilla.org/network/io-service;1"] .getService(CI.nsIIOService); var spec = Components.lookupMethod(window.content.opener, "location") .call(); this.popupURL = IOS.newURI(spec, null, null); // but cancel if it's an unsuitable URL const PM = Components.classes["@mozilla.org/PopupWindowManager;1"] .getService(CI.nsIPopupWindowManager); if (!PM.testSuitability(this.popupURL)) this.popupURL = null; } } catch(e) { } },
show = !PB.getBoolPref("dom.disable_open_during_load") && PB.getIntPref("privacy.popups.policy") == CI.nsIPopupWindowManager.ALLOW_POPUP && PB.getBoolPref("privacy.popups.usecustom");
show = !PB.getBoolPref("dom.disable_open_during_load");
initPopupURL: function() { return; // remove this line to reenable the context menu // quick check: if no opener, it can't be a popup if (!window.content.opener) return; try { var show = false; // is it a popup window? const CI = Components.interfaces; var xulwin = window .QueryInterface(CI.nsIInterfaceRequestor) .getInterface(CI.nsIWebNavigation) .QueryInterface(CI.nsIDocShellTreeItem) .treeOwner .QueryInterface(CI.nsIInterfaceRequestor) .getInterface(CI.nsIXULWindow); if (xulwin.contextFlags & CI.nsIWindowCreator2.PARENT_IS_LOADING_OR_RUNNING_TIMEOUT) { // do the pref settings allow site-by-site popup management? const PB = Components.classes["@mozilla.org/preferences-service;1"] .getService(CI.nsIPrefBranch); show = !PB.getBoolPref("dom.disable_open_during_load") && PB.getIntPref("privacy.popups.policy") == CI.nsIPopupWindowManager.ALLOW_POPUP && PB.getBoolPref("privacy.popups.usecustom"); } if (show) { // initialize popupURL const IOS = Components.classes["@mozilla.org/network/io-service;1"] .getService(CI.nsIIOService); var spec = Components.lookupMethod(window.content.opener, "location") .call(); this.popupURL = IOS.newURI(spec, null, null); // but cancel if it's an unsuitable URL const PM = Components.classes["@mozilla.org/PopupWindowManager;1"] .getService(CI.nsIPopupWindowManager); if (!PM.testSuitability(this.popupURL)) this.popupURL = null; } } catch(e) { } },
try { if (prefsTreeNode.hasAttribute('tabnavpref')) gTabNavPref = prefsTreeNode.getAttribute('tabnavpref'); else gTabNavPref = pref.GetIntPref('accessibility.tabfocus'); gTabNavPref |= 1;
gData = parent.hPrefWindow.wsm.dataManager.pageData["chrome:
function initPrefs(){ try { if (prefsTreeNode.hasAttribute('tabnavpref')) gTabNavPref = prefsTreeNode.getAttribute('tabnavpref'); else gTabNavPref = pref.GetIntPref('accessibility.tabfocus'); gTabNavPref |= 1; // Textboxes are always part of the tab order document.getElementById('tabNavigationLinks').setChecked((gTabNavPref & kTabToLinks) != 0); document.getElementById('tabNavigationForms').setChecked((gTabNavPref & kTabToForms) != 0); // XXX todo: On the mac, only the links checkbox should be exposed. // Whether the other form controls are tabbable is a system setting // that we should adhere to. if (prefsTreeNode.hasAttribute('linksonlypref')) linksOnlyPref = prefsTreeNode.getAttribute('linksonlypref'); else linksOnlyPref = pref.GetBoolPref('accessibility.typeaheadfind.linksonly')? 1: 0; var radioGroup = document.getElementById('findAsYouTypeAutoWhat'); radioGroup.selectedIndex = linksOnlyPref; setLinksOnlyDisabled(); } catch(e) {dump('\npref-keynav.initPrefs: ' + e);}}
document.getElementById('tabNavigationLinks').setChecked((gTabNavPref & kTabToLinks) != 0); document.getElementById('tabNavigationForms').setChecked((gTabNavPref & kTabToForms) != 0);
if (!("tabNavPref" in gData)) { gData.tabNavPref = parent.hPrefWindow.getPref('int', 'accessibility.tabfocus') | 1; gData.linksOnlyPref = parent.hPrefWindow.getPref('bool', 'accessibility.typeaheadfind.linksonly')? 1: 0; }
function initPrefs(){ try { if (prefsTreeNode.hasAttribute('tabnavpref')) gTabNavPref = prefsTreeNode.getAttribute('tabnavpref'); else gTabNavPref = pref.GetIntPref('accessibility.tabfocus'); gTabNavPref |= 1; // Textboxes are always part of the tab order document.getElementById('tabNavigationLinks').setChecked((gTabNavPref & kTabToLinks) != 0); document.getElementById('tabNavigationForms').setChecked((gTabNavPref & kTabToForms) != 0); // XXX todo: On the mac, only the links checkbox should be exposed. // Whether the other form controls are tabbable is a system setting // that we should adhere to. if (prefsTreeNode.hasAttribute('linksonlypref')) linksOnlyPref = prefsTreeNode.getAttribute('linksonlypref'); else linksOnlyPref = pref.GetBoolPref('accessibility.typeaheadfind.linksonly')? 1: 0; var radioGroup = document.getElementById('findAsYouTypeAutoWhat'); radioGroup.selectedIndex = linksOnlyPref; setLinksOnlyDisabled(); } catch(e) {dump('\npref-keynav.initPrefs: ' + e);}}
document.getElementById('tabNavigationLinks').setChecked((gData.tabNavPref & kTabToLinks) != 0); document.getElementById('tabNavigationForms').setChecked((gData.tabNavPref & kTabToForms) != 0);
function initPrefs(){ try { if (prefsTreeNode.hasAttribute('tabnavpref')) gTabNavPref = prefsTreeNode.getAttribute('tabnavpref'); else gTabNavPref = pref.GetIntPref('accessibility.tabfocus'); gTabNavPref |= 1; // Textboxes are always part of the tab order document.getElementById('tabNavigationLinks').setChecked((gTabNavPref & kTabToLinks) != 0); document.getElementById('tabNavigationForms').setChecked((gTabNavPref & kTabToForms) != 0); // XXX todo: On the mac, only the links checkbox should be exposed. // Whether the other form controls are tabbable is a system setting // that we should adhere to. if (prefsTreeNode.hasAttribute('linksonlypref')) linksOnlyPref = prefsTreeNode.getAttribute('linksonlypref'); else linksOnlyPref = pref.GetBoolPref('accessibility.typeaheadfind.linksonly')? 1: 0; var radioGroup = document.getElementById('findAsYouTypeAutoWhat'); radioGroup.selectedIndex = linksOnlyPref; setLinksOnlyDisabled(); } catch(e) {dump('\npref-keynav.initPrefs: ' + e);}}
if (prefsTreeNode.hasAttribute('linksonlypref')) linksOnlyPref = prefsTreeNode.getAttribute('linksonlypref'); else linksOnlyPref = pref.GetBoolPref('accessibility.typeaheadfind.linksonly')? 1: 0; var radioGroup = document.getElementById('findAsYouTypeAutoWhat'); radioGroup.selectedIndex = linksOnlyPref; setLinksOnlyDisabled(); } catch(e) {dump('\npref-keynav.initPrefs: ' + e);}
var radioGroup = document.getElementById('findAsYouTypeAutoWhat'); radioGroup.selectedIndex = gData.linksOnlyPref; setLinksOnlyDisabled();
function initPrefs(){ try { if (prefsTreeNode.hasAttribute('tabnavpref')) gTabNavPref = prefsTreeNode.getAttribute('tabnavpref'); else gTabNavPref = pref.GetIntPref('accessibility.tabfocus'); gTabNavPref |= 1; // Textboxes are always part of the tab order document.getElementById('tabNavigationLinks').setChecked((gTabNavPref & kTabToLinks) != 0); document.getElementById('tabNavigationForms').setChecked((gTabNavPref & kTabToForms) != 0); // XXX todo: On the mac, only the links checkbox should be exposed. // Whether the other form controls are tabbable is a system setting // that we should adhere to. if (prefsTreeNode.hasAttribute('linksonlypref')) linksOnlyPref = prefsTreeNode.getAttribute('linksonlypref'); else linksOnlyPref = pref.GetBoolPref('accessibility.typeaheadfind.linksonly')? 1: 0; var radioGroup = document.getElementById('findAsYouTypeAutoWhat'); radioGroup.selectedIndex = linksOnlyPref; setLinksOnlyDisabled(); } catch(e) {dump('\npref-keynav.initPrefs: ' + e);}}
console.addPref ("enableChromeFilter", false);
function initPrefs(){ console.prefs = new Object(); console.prefs.prefService = Components.classes[PREF_CTRID].getService(nsIPrefService); console.prefs.prefBranch = console.prefs.prefService.getBranch("extensions.venkman."); console.prefs.prefNames = new Array(); // console.addPref ("input.commandchar", "/"); console.addPref ("sourcetext.tab.width", 4); console.addPref ("input.history.max", 20); console.addPref ("input.dtab.time", 500); console.addPref ("initialScripts", ""); var list = console.prefs.prefBranch.getChildList("extensions.venkman.", {}); for (var p in list) { dd ("pref list " + list[p]); if (!(list[p] in console.prefs)) console.addPref(list[p]); } }
var statusFeedback = window.arguments[2];
var statusFeedback = window.arguments[2]; printSettings = window.arguments[3].QueryInterface(Components.interfaces.nsIPrintSettings);
function InitPrintEngineWindow(){ /* Tell the nsIPrintEngine object what window is rendering the email */ printEngine.SetWindow(window); // See if we got arguments. // Window was opened via window.openDialog. Copy argument // and perform compose initialization // if ( window.arguments && window.arguments[0] != null ) { var numSelected = window.arguments[0]; var uriArray = window.arguments[1]; var statusFeedback = window.arguments[2]; printEngine.SetStatusFeedback(statusFeedback); if (numSelected > 0) { printEngine.SetPrintURICount(numSelected); for(var i = 0; i < numSelected; i++) { dump(uriArray[i]); printEngine.AddPrintURI(uriArray[i]); dump("\n"); } } }}
doingPrintPreview = window.arguments[4]; printEngine.doPrintPreview = doingPrintPreview;
printEngine.doPrintPreview = window.arguments[4];
function InitPrintEngineWindow(){ /* Tell the nsIPrintEngine object what window is rendering the email */ printEngine.setWindow(window); /* hide the printEngine window. see bug #73995 */ /* See if we got arguments. * Window was opened via window.openDialog. Copy argument * and perform compose initialization */ if ( window.arguments && window.arguments[0] != null ) { var numSelected = window.arguments[0]; var uriArray = window.arguments[1]; var statusFeedback = window.arguments[2]; if (window.arguments[3]) { printSettings = window.arguments[3].QueryInterface(Components.interfaces.nsIPrintSettings); if (printSettings) { printSettings.isCancelled = false; } } if (window.arguments[4]) { doingPrintPreview = window.arguments[4]; //printEngine.showWindow(doingPrintPreview); printEngine.doPrintPreview = doingPrintPreview; } else { printEngine.doPrintPreview = false; } printEngine.showWindow(false); if (window.arguments.length > 5) { printEngine.setMsgType(window.arguments[5]); } else { printEngine.setMsgType(Components.interfaces.nsIMsgPrintEngine.MNAB_START); } if (window.arguments.length > 6) { printEngine.setParentWindow(window.arguments[6]); } else { printEngine.setParentWindow(null); } gStartupPPObserver.printengine = this; printEngine.setStatusFeedback(statusFeedback); printEngine.setStartupPPObserver(gStartupPPObserver); if (numSelected > 0) { printEngine.setPrintURICount(numSelected); for (var i = 0; i < numSelected; i++) { printEngine.addPrintURI(uriArray[i]); //dump(uriArray[i] + "\n"); } } }}
gStartupPPObserver.printengine = this;
function InitPrintEngineWindow(){ /* Tell the nsIPrintEngine object what window is rendering the email */ printEngine.setWindow(window); /* hide the printEngine window. see bug #73995 */ /* See if we got arguments. * Window was opened via window.openDialog. Copy argument * and perform compose initialization */ if ( window.arguments && window.arguments[0] != null ) { var numSelected = window.arguments[0]; var uriArray = window.arguments[1]; var statusFeedback = window.arguments[2]; if (window.arguments[3]) { printSettings = window.arguments[3].QueryInterface(Components.interfaces.nsIPrintSettings); if (printSettings) { printSettings.isCancelled = false; } } if (window.arguments[4]) { doingPrintPreview = window.arguments[4]; //printEngine.showWindow(doingPrintPreview); printEngine.doPrintPreview = doingPrintPreview; } else { printEngine.doPrintPreview = false; } printEngine.showWindow(false); if (window.arguments.length > 5) { printEngine.setMsgType(window.arguments[5]); } else { printEngine.setMsgType(Components.interfaces.nsIMsgPrintEngine.MNAB_START); } if (window.arguments.length > 6) { printEngine.setParentWindow(window.arguments[6]); } else { printEngine.setParentWindow(null); } gStartupPPObserver.printengine = this; printEngine.setStatusFeedback(statusFeedback); printEngine.setStartupPPObserver(gStartupPPObserver); if (numSelected > 0) { printEngine.setPrintURICount(numSelected); for (var i = 0; i < numSelected; i++) { printEngine.addPrintURI(uriArray[i]); //dump(uriArray[i] + "\n"); } } }}
document.getElementById("dontShowPrivacyStatement").setAttribute("checked", "true");
function initPrivacyNotice() { var reportWizard = document.getElementById('reportWizard'); // If they agreed, we continue on if (getBoolPref("hidePrivacyStatement", false)) { reportWizard.advance(); } else { // Don't let users rewind, and default to checked. reportWizard.canRewind = false; document.getElementById("dontShowPrivacyStatement").setAttribute("checked", "true"); // Load Privacy Policy var privacyURL = getCharPref("privacyURL", "http://reporter-test.mozilla.org/privacy/"); document.getElementById("privacyStatement").setAttribute("src", privacyURL+"?plain"); }}
if (gSearchInput.searchMode == 4 || gSearchInput.value == "" || gSearchInput.showingSearchCriteria)
GetSearchInput(); if (!gSearchInput ||gSearchInput.value == "" || gSearchInput.showingSearchCriteria)
function InitQuickSearchPopup(){ // disable the create virtual folder menu item if the current radio // value is set to Find in message since you can't really create a VF from find // in message if (gSearchInput.searchMode == 4 /* find in page */ || gSearchInput.value == "" || gSearchInput.showingSearchCriteria) document.getElementById('quickSearchSaveAsVirtualFolder').setAttribute('disabled', 'true'); else document.getElementById('quickSearchSaveAsVirtualFolder').removeAttribute('disabled');}
if (this.onImage){ var saveImageMenuItem = document.getElementById( 'context-saveimage' ); var imageName = extractFileNameFromUrl(this.imageURL); var bundle = srGetStrBundle("chrome: var caption = bundle.formatStringFromName("saveImageAs",[imageName],1); saveImageMenuItem.setAttribute( "value", caption ); }
initSaveItems : function () { // Save page is always OK, unless in directory listing. this.showItem( "context-savepage", !this.inDirList ); // Save frame as depends on whether we're in a frame. this.showItem( "context-saveframe", this.inFrame ); // Save link depends on whether we're in a link. this.showItem( "context-savelink", this.onSaveableLink ); // Save background image depends on whether there is one. this.showItem( "context-savebgimage", this.hasBGImage ); // Save image depends on whether there is one. this.showItem( "context-saveimage", this.onImage ); // Remove separator if none of these were shown. var showSep = !this.inDirList || this.inFrame || this.onSaveableLink || this.hasBGImage || this.onImage; this.showItem( "context-sep-save", showSep ); },
this.showItem( "context-savepage", !( this.inDirList || this.isTextSelected || this.onTextInput || this.onLink )); this.showItem( "context-sendpage", !( this.inDirList || this.isTextSelected || this.onTextInput || this.onLink ));
this.showItem( "context-savepage", !( this.inDirList || this.isTextSelected || this.onTextInput || this.onLink || this.onImage )); this.showItem( "context-sendpage", !( this.inDirList || this.isTextSelected || this.onTextInput || this.onLink || this.onImage ));
initSaveItems : function () { this.showItem( "context-savepage", !( this.inDirList || this.isTextSelected || this.onTextInput || this.onLink )); this.showItem( "context-sendpage", !( this.inDirList || this.isTextSelected || this.onTextInput || this.onLink )); // Save link depends on whether we're in a link. this.showItem( "context-savelink", this.onSaveableLink ); // Save image depends on whether there is one. this.showItem( "context-saveimage", this.onImage ); this.showItem( "context-sendimage", this.onImage ); // Send link depends on whether we're in a link. this.showItem( "context-sendlink", this.onSaveableLink ); },
var caption = bundle.formatStringFromName("saveImageAs",[imageName],1);
var caption; if (imageName) { caption = bundle.formatStringFromName("saveImageAs", [imageName], 1); } else { caption = bundle.GetStringFromName("saveImageAsNoFilename"); }
initSaveItems : function () { // Save page is always OK, unless in directory listing. this.showItem( "context-savepage", !this.inDirList ); // Save frame as depends on whether we're in a frame. this.showItem( "context-saveframe", this.inFrame ); // Save link depends on whether we're in a link. this.showItem( "context-savelink", this.onSaveableLink ); // Save image depends on whether there is one. this.showItem( "context-saveimage", this.onImage ); if (this.onImage){ //if onImage, let's get the imagename into the context menu var saveImageMenuItem = document.getElementById( 'context-saveimage' ); var imageName = extractFileNameFromUrl(this.imageURL); var bundle = srGetStrBundle("chrome://communicator/locale/contentAreaCommands.properties"); var caption = bundle.formatStringFromName("saveImageAs",[imageName],1); saveImageMenuItem.setAttribute( "label", caption ); } // Remove separator if none of these were shown. var showSep = !this.inDirList || this.inFrame || this.onSaveableLink || this.hasBGImage || this.onImage; this.showItem( "context-sep-save", showSep ); },
this.showItem( "context-savepage", !( this.inDirList || this.isTextSelected || this.onTextInput || this.onStandaloneImage || (this.onLink && this.onImage)));
var showSave = !( this.inDirList || this.isTextSelected || this.onTextInput || this.onStandaloneImage || ( this.onLink && this.onImage ) ); if (showSave) goSetMenuValue( "context-savepage", this.autoDownload ? "valueSave" : "valueSaveAs" ); this.showItem( "context-savepage", showSave );
initSaveItems : function () { this.showItem( "context-savepage", !( this.inDirList || this.isTextSelected || this.onTextInput || this.onStandaloneImage || (this.onLink && this.onImage))); // Save link depends on whether we're in a link. this.showItem( "context-savelink", this.onSaveableLink ); // Save image depends on whether there is one. this.showItem( "context-saveimage", this.onImage || this.onStandaloneImage); this.showItem( "context-sendimage", this.onImage || this.onStandaloneImage); },
this.showItem( "context-saveimage", this.onImage || this.onStandaloneImage); this.showItem( "context-sendimage", this.onImage || this.onStandaloneImage);
showSave = this.onImage || this.onStandaloneImage; if (showSave) goSetMenuValue( "context-saveimage", this.autoDownload ? "valueSave" : "valueSaveAs" ); this.showItem( "context-saveimage", showSave ); this.showItem( "context-sendimage", showSave );
initSaveItems : function () { this.showItem( "context-savepage", !( this.inDirList || this.isTextSelected || this.onTextInput || this.onStandaloneImage || (this.onLink && this.onImage))); // Save link depends on whether we're in a link. this.showItem( "context-savelink", this.onSaveableLink ); // Save image depends on whether there is one. this.showItem( "context-saveimage", this.onImage || this.onStandaloneImage); this.showItem( "context-sendimage", this.onImage || this.onStandaloneImage); },
var showSave = !( this.inDirList || this.isTextSelected || this.onTextInput || this.onStandaloneImage ||
var showSave = !( this.inDirList || this.isContentSelected || this.onTextInput || this.onStandaloneImage ||
initSaveItems : function () { var showSave = !( this.inDirList || this.isTextSelected || this.onTextInput || this.onStandaloneImage || ( this.onLink && this.onImage ) ); if (showSave) goSetMenuValue( "context-savepage", this.autoDownload ? "valueSave" : "valueSaveAs" ); this.showItem( "context-savepage", showSave ); // Save link depends on whether we're in a link. if (this.onSaveableLink) goSetMenuValue( "context-savelink", this.autoDownload ? "valueSave" : "valueSaveAs" ); this.showItem( "context-savelink", this.onSaveableLink ); // Save/Send image depends on whether there is one. showSave = this.onLoadedImage || this.onStandaloneImage; if (showSave) goSetMenuValue( "context-saveimage", this.autoDownload ? "valueSave" : "valueSaveAs" ); this.showItem( "context-saveimage", showSave ); this.showItem( "context-sendimage", showSave ); },
onLockPreference();
function initSmtpSettings(server) { gSmtpUsername = document.getElementById("smtp.username"); gSmtpUsernameLabel = document.getElementById("smtpusernamelabel"); gSmtpHostname = document.getElementById("smtp.hostname"); gSmtpPort = document.getElementById("smtp.port"); gSmtpUseUsername = document.getElementById("smtp.useUsername"); gSmtpAuthMethod = document.getElementById("smtp.authMethod"); gSmtpTrySSL = document.getElementById("smtp.trySSL"); if (server) { gSmtpHostname.value = server.hostname; gSmtpPort.value = server.port ? server.port : ""; gSmtpUsername.value = server.username; gSmtpAuthMethod.setAttribute("value", server.authMethod); var elements = gSmtpTrySSL.getElementsByAttribute("value", server.trySSL); if (elements.length == 0) elements = gSmtpTrySSL.getElementsByAttribute("value", "1"); gSmtpTrySSL.selectedItem = elements[0]; } else { gSmtpAuthMethod.setAttribute("value", "1"); gSmtpTrySSL.selectedItem = gSmtpTrySSL.getElementsByAttribute("value", "1")[0]; } if (gSmtpAuthMethod.getAttribute("value") == "1") gSmtpUseUsername.checked = true; //dump("gSmtpAuthMethod = <" + gSmtpAuthMethod.localName + ">\n"); //dump("gSmtpAuthMethod.value = " + gSmtpAuthMethod.getAttribute("value") + "\n"); onUseUsername(gSmtpUseUsername, false); updateControls();}
if (gSmtpAuthMethod.getAttribute("value") == "1") gSmtpUseUsername.checked = true;
gSmtpUseUsername.checked = (gSmtpAuthMethod.getAttribute("value") == "1");
function initSmtpSettings(server) { gSmtpUsername = document.getElementById("smtp.username"); gSmtpUsernameLabel = document.getElementById("smtpusernamelabel"); gSmtpHostname = document.getElementById("smtp.hostname"); gSmtpPort = document.getElementById("smtp.port"); gSmtpUseUsername = document.getElementById("smtp.useUsername"); gSmtpAuthMethod = document.getElementById("smtp.authMethod"); gSmtpTrySSL = document.getElementById("smtp.trySSL"); gDefaultPort = document.getElementById("smtp.defaultPort"); gPort = document.getElementById("smtp.port"); gSmtpS = document.getElementById("smtp.alwaysSmtpS"); if (server) { gSmtpHostname.value = server.hostname; gSmtpPort.value = server.port ? server.port : ""; gSmtpUsername.value = server.username; gSmtpAuthMethod.setAttribute("value", server.authMethod); var elements = gSmtpTrySSL.getElementsByAttribute("value", server.trySSL); if (elements.length == 0) elements = gSmtpTrySSL.getElementsByAttribute("value", "1"); gSmtpTrySSL.selectedItem = elements[0]; } else { gSmtpAuthMethod.setAttribute("value", "1"); gSmtpTrySSL.selectedItem = gSmtpTrySSL.getElementsByAttribute("value", "1")[0]; } if (gSmtpAuthMethod.getAttribute("value") == "1") gSmtpUseUsername.checked = true; //dump("gSmtpAuthMethod = <" + gSmtpAuthMethod.localName + ">\n"); //dump("gSmtpAuthMethod.value = " + gSmtpAuthMethod.getAttribute("value") + "\n"); onUseUsername(gSmtpUseUsername, false); updateControls(); selectProtocol(1); if (gSmtpService.defaultServer) onLockPreference();}
gSmtpDescription.value = server.description;
function initSmtpSettings(server) { gSmtpUsername = document.getElementById("smtp.username"); gSmtpUsernameLabel = document.getElementById("smtpusernamelabel"); gSmtpHostname = document.getElementById("smtp.hostname"); gSmtpPort = document.getElementById("smtp.port"); gSmtpUseUsername = document.getElementById("smtp.useUsername"); gSmtpAuthMethod = document.getElementById("smtp.authMethod"); gSmtpTrySSL = document.getElementById("smtp.trySSL"); gDefaultPort = document.getElementById("smtp.defaultPort"); gPort = document.getElementById("smtp.port"); if (server) { gSmtpHostname.value = server.hostname; gSmtpPort.value = server.port ? server.port : ""; gSmtpUsername.value = server.username; gSmtpAuthMethod.setAttribute("value", server.authMethod); gSmtpTrySSL.value = (server.trySSL < 4) ? server.trySSL : 1; } else { gSmtpAuthMethod.setAttribute("value", "1"); gSmtpTrySSL.value = 1; } gSmtpUseUsername.checked = (gSmtpAuthMethod.getAttribute("value") == "1"); //dump("gSmtpAuthMethod = <" + gSmtpAuthMethod.localName + ">\n"); //dump("gSmtpAuthMethod.value = " + gSmtpAuthMethod.getAttribute("value") + "\n"); onUseUsername(gSmtpUseUsername, false); updateControls(); selectProtocol(1); if (gSmtpService.defaultServer) onLockPreference();}
updateControls();
function initSmtpSettings(server) { gSmtpUsername = document.getElementById("smtp.username"); gSmtpDescription = document.getElementById("smtp.description"); gSmtpUsernameLabel = document.getElementById("smtpusernamelabel"); gSmtpHostname = document.getElementById("smtp.hostname"); gSmtpPort = document.getElementById("smtp.port"); gSmtpUseUsername = document.getElementById("smtp.useUsername"); gSmtpAuthMethod = document.getElementById("smtp.authMethod"); gSmtpTrySSL = document.getElementById("smtp.trySSL"); gDefaultPort = document.getElementById("smtp.defaultPort"); gPort = document.getElementById("smtp.port"); if (server) { gSmtpHostname.value = server.hostname; gSmtpDescription.value = server.description; gSmtpPort.value = server.port ? server.port : ""; gSmtpUsername.value = server.username; gSmtpAuthMethod.setAttribute("value", server.authMethod); gSmtpTrySSL.value = (server.trySSL < 4) ? server.trySSL : 1; } else { gSmtpAuthMethod.setAttribute("value", "1"); gSmtpTrySSL.value = 1; } gSmtpUseUsername.checked = (gSmtpAuthMethod.getAttribute("value") == "1"); //dump("gSmtpAuthMethod = <" + gSmtpAuthMethod.localName + ">\n"); //dump("gSmtpAuthMethod.value = " + gSmtpAuthMethod.getAttribute("value") + "\n"); onUseUsername(gSmtpUseUsername, false); updateControls(); selectProtocol(1); if (gSmtpService.defaultServer) onLockPreference();}
var suggestionsSeparator = document.getElementById("spell-add-to-dictionary");
var suggestionsSeparator = document.getElementById("spell-add-separator");
initSpellingItems : function () { var canSpell = InlineSpellCheckerUI.canSpellCheck; var onMisspelling = InlineSpellCheckerUI.overMisspelling; this.showItem("spell-check-enabled", canSpell); this.showItem("spell-separator", canSpell || this.possibleSpellChecking); if (canSpell) document.getElementById("spell-check-enabled").setAttribute("checked", InlineSpellCheckerUI.enabled); this.showItem("spell-add-to-dictionary", onMisspelling); // suggestion list this.showItem("spell-suggestions-separator", onMisspelling); if (onMisspelling) { var menu = document.getElementById("contentAreaContextMenu"); var suggestionsSeparator = document.getElementById("spell-add-to-dictionary"); var numsug = InlineSpellCheckerUI.addSuggestionsToMenu(menu, suggestionsSeparator, 5); this.showItem("spell-no-suggestions", numsug == 0); } else { this.showItem("spell-no-suggestions", false); } // dictionary list this.showItem("spell-dictionaries", InlineSpellCheckerUI.enabled); if (canSpell) { var dictMenu = document.getElementById("spell-dictionaries-menu"); var dictSep = document.getElementById("spell-language-separator"); InlineSpellCheckerUI.addDictionaryListToMenu(dictMenu, dictSep); } // when there is no spellchecker but we might be able to spellcheck // add the add to dictionaries item. This will ensure that people // with no dictionaries will be able to download them this.showItem("spell-add-dictionaries-main", !canSpell && this.possibleSpellChecking); },
var ary = navigator.userAgent.match (/(rv:[^;)\s]+).*?Gecko\/(\d+)/);
function initStatic(){ client.mainWindow = window; try { var io = Components.classes['@mozilla.org/network/io-service;1']; client.iosvc = io.getService(Components.interfaces.nsIIOService); } catch (ex) { dd("IO service failed to initalize: " + ex); } try { const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); client.soundList = new Object(); } catch (ex) { dd("Sound failed to initalize: " + ex); } try { const nsIGlobalHistory = Components.interfaces.nsIGlobalHistory; const GHIST_CONTRACTID = "@mozilla.org/browser/global-history;1"; client.globalHistory = Components.classes[GHIST_CONTRACTID].getService(nsIGlobalHistory); } catch (ex) { dd("Global History failed to initalize: " + ex); } try { const nsISDateFormat = Components.interfaces.nsIScriptableDateFormat; const DTFMT_CID = "@mozilla.org/intl/scriptabledateformat;1"; client.dtFormatter = Components.classes[DTFMT_CID].createInstance(nsISDateFormat); // Mmmm, fun. This ONLY affects the ChatZilla window, don't worry! Date.prototype.toStringInt = Date.prototype.toString; Date.prototype.toString = function() { var dtf = client.dtFormatter; return dtf.FormatDateTime("", dtf.dateFormatLong, dtf.timeFormatSeconds, this.getFullYear(), this.getMonth() + 1, this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds() ); } } catch (ex) { dd("Locale-correct date formatting failed to initalize: " + ex); } multilineInputMode(client.prefs["multiline"]); if (client.prefs["showModeSymbols"]) setListMode("symbol"); else setListMode("graphic"); setDebugMode(client.prefs["debugMode"]); var ver = __cz_version + (__cz_suffix ? "-" + __cz_suffix : ""); var ary = navigator.userAgent.match (/(rv:[^;)\s]+).*?Gecko\/(\d+)/); var ua = navigator.userAgent; if (ary) { if (navigator.vendor) ua = navigator.vendor + " " + navigator.vendorSub; else ua = client.entities.brandShortName + " " + ary[1]; ua = ua + "/" + ary[2]; } client.userAgent = getMsg(MSG_VERSION_REPLY, [ver, ua]); CIRCServer.prototype.HOST_RPLY = client.entities.brandShortName + ", " + client.platform; CIRCServer.prototype.VERSION_RPLY = client.userAgent; CIRCServer.prototype.SOURCE_RPLY = MSG_SOURCE_REPLY; client.statusBar = new Object(); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusElement = document.getElementById("status-text"); client.defaultStatus = MSG_DEFAULT_STATUS; client.progressPanel = document.getElementById("status-progress-panel"); client.progressBar = document.getElementById("status-progress-bar"); client.logFile = null; setInterval("onNotifyTimeout()", client.NOTIFY_TIMEOUT); setInterval("onWhoTimeout()", client.AWAY_TIMEOUT); client.defaultCompletion = client.COMMAND_CHAR + "help "; client.deck = document.getElementById('output-deck');}
if (ary)
var app = getService("@mozilla.org/xre/app-info;1", "nsIXULAppInfo"); if (app)
function initStatic(){ client.mainWindow = window; try { var io = Components.classes['@mozilla.org/network/io-service;1']; client.iosvc = io.getService(Components.interfaces.nsIIOService); } catch (ex) { dd("IO service failed to initalize: " + ex); } try { const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); client.soundList = new Object(); } catch (ex) { dd("Sound failed to initalize: " + ex); } try { const nsIGlobalHistory = Components.interfaces.nsIGlobalHistory; const GHIST_CONTRACTID = "@mozilla.org/browser/global-history;1"; client.globalHistory = Components.classes[GHIST_CONTRACTID].getService(nsIGlobalHistory); } catch (ex) { dd("Global History failed to initalize: " + ex); } try { const nsISDateFormat = Components.interfaces.nsIScriptableDateFormat; const DTFMT_CID = "@mozilla.org/intl/scriptabledateformat;1"; client.dtFormatter = Components.classes[DTFMT_CID].createInstance(nsISDateFormat); // Mmmm, fun. This ONLY affects the ChatZilla window, don't worry! Date.prototype.toStringInt = Date.prototype.toString; Date.prototype.toString = function() { var dtf = client.dtFormatter; return dtf.FormatDateTime("", dtf.dateFormatLong, dtf.timeFormatSeconds, this.getFullYear(), this.getMonth() + 1, this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds() ); } } catch (ex) { dd("Locale-correct date formatting failed to initalize: " + ex); } multilineInputMode(client.prefs["multiline"]); if (client.prefs["showModeSymbols"]) setListMode("symbol"); else setListMode("graphic"); setDebugMode(client.prefs["debugMode"]); var ver = __cz_version + (__cz_suffix ? "-" + __cz_suffix : ""); var ary = navigator.userAgent.match (/(rv:[^;)\s]+).*?Gecko\/(\d+)/); var ua = navigator.userAgent; if (ary) { if (navigator.vendor) ua = navigator.vendor + " " + navigator.vendorSub; else ua = client.entities.brandShortName + " " + ary[1]; ua = ua + "/" + ary[2]; } client.userAgent = getMsg(MSG_VERSION_REPLY, [ver, ua]); CIRCServer.prototype.HOST_RPLY = client.entities.brandShortName + ", " + client.platform; CIRCServer.prototype.VERSION_RPLY = client.userAgent; CIRCServer.prototype.SOURCE_RPLY = MSG_SOURCE_REPLY; client.statusBar = new Object(); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusElement = document.getElementById("status-text"); client.defaultStatus = MSG_DEFAULT_STATUS; client.progressPanel = document.getElementById("status-progress-panel"); client.progressBar = document.getElementById("status-progress-bar"); client.logFile = null; setInterval("onNotifyTimeout()", client.NOTIFY_TIMEOUT); setInterval("onWhoTimeout()", client.AWAY_TIMEOUT); client.defaultCompletion = client.COMMAND_CHAR + "help "; client.deck = document.getElementById('output-deck');}
if (navigator.vendor) ua = navigator.vendor + " " + navigator.vendorSub; else ua = client.entities.brandShortName + " " + ary[1]; ua = ua + "/" + ary[2];
ua = app.name + " " + app.version + "/" + app.geckoBuildID; CIRCServer.prototype.HOST_RPLY = app.vendor + " " + app.name + " " + app.version + ", " + client.platform;
function initStatic(){ client.mainWindow = window; try { var io = Components.classes['@mozilla.org/network/io-service;1']; client.iosvc = io.getService(Components.interfaces.nsIIOService); } catch (ex) { dd("IO service failed to initalize: " + ex); } try { const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); client.soundList = new Object(); } catch (ex) { dd("Sound failed to initalize: " + ex); } try { const nsIGlobalHistory = Components.interfaces.nsIGlobalHistory; const GHIST_CONTRACTID = "@mozilla.org/browser/global-history;1"; client.globalHistory = Components.classes[GHIST_CONTRACTID].getService(nsIGlobalHistory); } catch (ex) { dd("Global History failed to initalize: " + ex); } try { const nsISDateFormat = Components.interfaces.nsIScriptableDateFormat; const DTFMT_CID = "@mozilla.org/intl/scriptabledateformat;1"; client.dtFormatter = Components.classes[DTFMT_CID].createInstance(nsISDateFormat); // Mmmm, fun. This ONLY affects the ChatZilla window, don't worry! Date.prototype.toStringInt = Date.prototype.toString; Date.prototype.toString = function() { var dtf = client.dtFormatter; return dtf.FormatDateTime("", dtf.dateFormatLong, dtf.timeFormatSeconds, this.getFullYear(), this.getMonth() + 1, this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds() ); } } catch (ex) { dd("Locale-correct date formatting failed to initalize: " + ex); } multilineInputMode(client.prefs["multiline"]); if (client.prefs["showModeSymbols"]) setListMode("symbol"); else setListMode("graphic"); setDebugMode(client.prefs["debugMode"]); var ver = __cz_version + (__cz_suffix ? "-" + __cz_suffix : ""); var ary = navigator.userAgent.match (/(rv:[^;)\s]+).*?Gecko\/(\d+)/); var ua = navigator.userAgent; if (ary) { if (navigator.vendor) ua = navigator.vendor + " " + navigator.vendorSub; else ua = client.entities.brandShortName + " " + ary[1]; ua = ua + "/" + ary[2]; } client.userAgent = getMsg(MSG_VERSION_REPLY, [ver, ua]); CIRCServer.prototype.HOST_RPLY = client.entities.brandShortName + ", " + client.platform; CIRCServer.prototype.VERSION_RPLY = client.userAgent; CIRCServer.prototype.SOURCE_RPLY = MSG_SOURCE_REPLY; client.statusBar = new Object(); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusElement = document.getElementById("status-text"); client.defaultStatus = MSG_DEFAULT_STATUS; client.progressPanel = document.getElementById("status-progress-panel"); client.progressBar = document.getElementById("status-progress-bar"); client.logFile = null; setInterval("onNotifyTimeout()", client.NOTIFY_TIMEOUT); setInterval("onWhoTimeout()", client.AWAY_TIMEOUT); client.defaultCompletion = client.COMMAND_CHAR + "help "; client.deck = document.getElementById('output-deck');}
CIRCServer.prototype.HOST_RPLY = client.entities.brandShortName + ", " + client.platform;
function initStatic(){ client.mainWindow = window; try { var io = Components.classes['@mozilla.org/network/io-service;1']; client.iosvc = io.getService(Components.interfaces.nsIIOService); } catch (ex) { dd("IO service failed to initalize: " + ex); } try { const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); client.soundList = new Object(); } catch (ex) { dd("Sound failed to initalize: " + ex); } try { const nsIGlobalHistory = Components.interfaces.nsIGlobalHistory; const GHIST_CONTRACTID = "@mozilla.org/browser/global-history;1"; client.globalHistory = Components.classes[GHIST_CONTRACTID].getService(nsIGlobalHistory); } catch (ex) { dd("Global History failed to initalize: " + ex); } try { const nsISDateFormat = Components.interfaces.nsIScriptableDateFormat; const DTFMT_CID = "@mozilla.org/intl/scriptabledateformat;1"; client.dtFormatter = Components.classes[DTFMT_CID].createInstance(nsISDateFormat); // Mmmm, fun. This ONLY affects the ChatZilla window, don't worry! Date.prototype.toStringInt = Date.prototype.toString; Date.prototype.toString = function() { var dtf = client.dtFormatter; return dtf.FormatDateTime("", dtf.dateFormatLong, dtf.timeFormatSeconds, this.getFullYear(), this.getMonth() + 1, this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds() ); } } catch (ex) { dd("Locale-correct date formatting failed to initalize: " + ex); } multilineInputMode(client.prefs["multiline"]); if (client.prefs["showModeSymbols"]) setListMode("symbol"); else setListMode("graphic"); setDebugMode(client.prefs["debugMode"]); var ver = __cz_version + (__cz_suffix ? "-" + __cz_suffix : ""); var ary = navigator.userAgent.match (/(rv:[^;)\s]+).*?Gecko\/(\d+)/); var ua = navigator.userAgent; if (ary) { if (navigator.vendor) ua = navigator.vendor + " " + navigator.vendorSub; else ua = client.entities.brandShortName + " " + ary[1]; ua = ua + "/" + ary[2]; } client.userAgent = getMsg(MSG_VERSION_REPLY, [ver, ua]); CIRCServer.prototype.HOST_RPLY = client.entities.brandShortName + ", " + client.platform; CIRCServer.prototype.VERSION_RPLY = client.userAgent; CIRCServer.prototype.SOURCE_RPLY = MSG_SOURCE_REPLY; client.statusBar = new Object(); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusElement = document.getElementById("status-text"); client.defaultStatus = MSG_DEFAULT_STATUS; client.progressPanel = document.getElementById("status-progress-panel"); client.progressBar = document.getElementById("status-progress-bar"); client.logFile = null; setInterval("onNotifyTimeout()", client.NOTIFY_TIMEOUT); setInterval("onWhoTimeout()", client.AWAY_TIMEOUT); client.defaultCompletion = client.COMMAND_CHAR + "help "; client.deck = document.getElementById('output-deck');}
ary = client.INITIAL_VICTIMS.split(";");
ary = client.INITIAL_VICTIMS.split(/\s*;\s*/);
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); if (client.CHARSET) setCharset(client.CHARSET); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + " [" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keypress", onInputKeyPress, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keypress", onMultilineInputKeyPress, false); obj = document.getElementById("channel-topicedit"); obj.addEventListener("keypress", onTopicKeyPress, false); obj.active = false; window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setMenuCheck ("menu-colors", client.enableColors); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["header"] = setMenuCheck ("menu-view-header", isVisible("header-bar-tbox")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar")); client.statusBar = new Object(); client.statusBar["header-url"] = document.getElementById ("header-url"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicedit"] = document.getElementById ("channel-topicedit"); client.statusElement = document.getElementById ("status-text"); client.defaultStatus = getMsg ("defaultStatus"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if ("arguments" in window && 0 in window.arguments && typeof window.arguments[0] == "object" && "url" in window.arguments[0]) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ ary = client.INITIAL_URLS.split(";"); for (var i in ary) { if ((ary[i] = stringTrim(ary[i])) && ary[i] != "irc://") { gotoIRCURL (ary[i]); } } } if (client.viewsArray.length > 1 && !isStartupURL("irc://")) { var tb = getTabForObject (client); deleteTab(tb); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
ary[i] = stringTrim(ary[i]);
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); if (client.CHARSET) setCharset(client.CHARSET); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + " [" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keypress", onInputKeyPress, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keypress", onMultilineInputKeyPress, false); obj = document.getElementById("channel-topicedit"); obj.addEventListener("keypress", onTopicKeyPress, false); obj.active = false; window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setMenuCheck ("menu-colors", client.enableColors); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["header"] = setMenuCheck ("menu-view-header", isVisible("header-bar-tbox")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar")); client.statusBar = new Object(); client.statusBar["header-url"] = document.getElementById ("header-url"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicedit"] = document.getElementById ("channel-topicedit"); client.statusElement = document.getElementById ("status-text"); client.defaultStatus = getMsg ("defaultStatus"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if ("arguments" in window && 0 in window.arguments && typeof window.arguments[0] == "object" && "url" in window.arguments[0]) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ ary = client.INITIAL_URLS.split(";"); for (var i in ary) { if ((ary[i] = stringTrim(ary[i])) && ary[i] != "irc://") { gotoIRCURL (ary[i]); } } } if (client.viewsArray.length > 1 && !isStartupURL("irc://")) { var tb = getTabForObject (client); deleteTab(tb); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
ary = client.INITIAL_URLS.split(";");
ary = client.INITIAL_URLS.split(/\s*;\s*/).reverse();
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); if (client.CHARSET) setCharset(client.CHARSET); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + " [" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keypress", onInputKeyPress, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keypress", onMultilineInputKeyPress, false); obj = document.getElementById("channel-topicedit"); obj.addEventListener("keypress", onTopicKeyPress, false); obj.active = false; window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setMenuCheck ("menu-colors", client.enableColors); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["header"] = setMenuCheck ("menu-view-header", isVisible("header-bar-tbox")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar")); client.statusBar = new Object(); client.statusBar["header-url"] = document.getElementById ("header-url"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicedit"] = document.getElementById ("channel-topicedit"); client.statusElement = document.getElementById ("status-text"); client.defaultStatus = getMsg ("defaultStatus"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if ("arguments" in window && 0 in window.arguments && typeof window.arguments[0] == "object" && "url" in window.arguments[0]) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ ary = client.INITIAL_URLS.split(";"); for (var i in ary) { if ((ary[i] = stringTrim(ary[i])) && ary[i] != "irc://") { gotoIRCURL (ary[i]); } } } if (client.viewsArray.length > 1 && !isStartupURL("irc://")) { var tb = getTabForObject (client); deleteTab(tb); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
if ((ary[i] = stringTrim(ary[i])) && ary[i] != "irc: {
if (ary[i] && ary[i] != "irc:
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); if (client.CHARSET) setCharset(client.CHARSET); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + " [" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keypress", onInputKeyPress, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keypress", onMultilineInputKeyPress, false); obj = document.getElementById("channel-topicedit"); obj.addEventListener("keypress", onTopicKeyPress, false); obj.active = false; window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setMenuCheck ("menu-colors", client.enableColors); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["header"] = setMenuCheck ("menu-view-header", isVisible("header-bar-tbox")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar")); client.statusBar = new Object(); client.statusBar["header-url"] = document.getElementById ("header-url"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicedit"] = document.getElementById ("channel-topicedit"); client.statusElement = document.getElementById ("status-text"); client.defaultStatus = getMsg ("defaultStatus"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if ("arguments" in window && 0 in window.arguments && typeof window.arguments[0] == "object" && "url" in window.arguments[0]) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ ary = client.INITIAL_URLS.split(";"); for (var i in ary) { if ((ary[i] = stringTrim(ary[i])) && ary[i] != "irc://") { gotoIRCURL (ary[i]); } } } if (client.viewsArray.length > 1 && !isStartupURL("irc://")) { var tb = getTabForObject (client); deleteTab(tb); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
}
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); if (client.CHARSET) setCharset(client.CHARSET); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + " [" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keypress", onInputKeyPress, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keypress", onMultilineInputKeyPress, false); obj = document.getElementById("channel-topicedit"); obj.addEventListener("keypress", onTopicKeyPress, false); obj.active = false; window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setMenuCheck ("menu-colors", client.enableColors); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["header"] = setMenuCheck ("menu-view-header", isVisible("header-bar-tbox")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar")); client.statusBar = new Object(); client.statusBar["header-url"] = document.getElementById ("header-url"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicedit"] = document.getElementById ("channel-topicedit"); client.statusElement = document.getElementById ("status-text"); client.defaultStatus = getMsg ("defaultStatus"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if ("arguments" in window && 0 in window.arguments && typeof window.arguments[0] == "object" && "url" in window.arguments[0]) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ ary = client.INITIAL_URLS.split(";"); for (var i in ary) { if ((ary[i] = stringTrim(ary[i])) && ary[i] != "irc://") { gotoIRCURL (ary[i]); } } } if (client.viewsArray.length > 1 && !isStartupURL("irc://")) { var tb = getTabForObject (client); deleteTab(tb); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
obj.addEventListener("keyup", onInputKeyUp, false);
obj.addEventListener("keypress", onInputKeyPress, false);
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + "[" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keyup", onMultilineInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if (window.arguments && window.arguments[0] && window.arguments[0].url) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ var ary = client.INITIAL_URLS.split(";"); for (var i in ary) if ((ary[i] = stringTrim(ary[i]))) gotoIRCURL (ary[i]); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
obj.addEventListener("keyup", onMultilineInputKeyUp, false);
obj.addEventListener("keypress", onMultilineInputKeyPress, false); obj = document.getElementById("channel-topicedit"); obj.addEventListener("keypress", onTopicKeyPress, false); obj.active = false;
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + "[" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keyup", onMultilineInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if (window.arguments && window.arguments[0] && window.arguments[0].url) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ var ary = client.INITIAL_URLS.split(";"); for (var i in ary) if ((ary[i] = stringTrim(ary[i]))) gotoIRCURL (ary[i]); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
setMenuCheck ("menu-view-status", isVisible("status-bar-tbar"));
setMenuCheck ("menu-view-status", isVisible("status-bar"));
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + "[" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keyup", onMultilineInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if (window.arguments && window.arguments[0] && window.arguments[0].url) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ var ary = client.INITIAL_URLS.split(";"); for (var i in ary) if ((ary[i] = stringTrim(ary[i]))) gotoIRCURL (ary[i]); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name");
client.statusBar["header-url"] = document.getElementById ("header-url");
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + "[" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keyup", onMultilineInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if (window.arguments && window.arguments[0] && window.arguments[0].url) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ var ary = client.INITIAL_URLS.split(";"); for (var i in ary) if ((ary[i] = stringTrim(ary[i]))) gotoIRCURL (ary[i]); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key");
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + "[" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keyup", onMultilineInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if (window.arguments && window.arguments[0] && window.arguments[0].url) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ var ary = client.INITIAL_URLS.split(";"); for (var i in ary) if ((ary[i] = stringTrim(ary[i]))) gotoIRCURL (ary[i]); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby");
client.statusBar["channel-topicedit"] = document.getElementById ("channel-topicedit");
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + "[" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keyup", onMultilineInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if (window.arguments && window.arguments[0] && window.arguments[0].url) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ var ary = client.INITIAL_URLS.split(";"); for (var i in ary) if ((ary[i] = stringTrim(ary[i]))) gotoIRCURL (ary[i]); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
if (window.arguments && window.arguments[0] && window.arguments[0].url)
if ("arguments" in window && 0 in window.arguments && typeof window.arguments[0] == "object" && "url" in window.arguments[0])
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + "[" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keyup", onMultilineInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if (window.arguments && window.arguments[0] && window.arguments[0].url) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ var ary = client.INITIAL_URLS.split(";"); for (var i in ary) if ((ary[i] = stringTrim(ary[i]))) gotoIRCURL (ary[i]); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
var ary = client.INITIAL_URLS.split(";");
ary = client.INITIAL_URLS.split(";");
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + "[" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keyup", onMultilineInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if (window.arguments && window.arguments[0] && window.arguments[0].url) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ var ary = client.INITIAL_URLS.split(";"); for (var i in ary) if ((ary[i] = stringTrim(ary[i]))) gotoIRCURL (ary[i]); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
if ((ary[i] = stringTrim(ary[i])))
{ if ((ary[i] = stringTrim(ary[i])) && ary[i] != "irc: {
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + "[" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keyup", onMultilineInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if (window.arguments && window.arguments[0] && window.arguments[0].url) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ var ary = client.INITIAL_URLS.split(";"); for (var i in ary) if ((ary[i] = stringTrim(ary[i]))) gotoIRCURL (ary[i]); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
if (client.viewsArray.length > 1 && !isStartupURL("irc: { var tb = getTabForObject (client); deleteTab(tb); }
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + "[" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keyup", onMultilineInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); var wentSomewhere = false; if (window.arguments && window.arguments[0] && window.arguments[0].url) { url = window.arguments[0].url; if (url.search(/^irc:\/?\/?$/i) == -1) { /* if the url is not irc: irc:/ or irc://, then go to it. */ gotoIRCURL (url); wentSomewhere = true; } } if (!wentSomewhere) { /* if we had nowhere else to go, connect to any default urls */ var ary = client.INITIAL_URLS.split(";"); for (var i in ary) if ((ary[i] = stringTrim(ary[i]))) gotoIRCURL (ary[i]); } setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
setMenuCheck ("menu-viewicons", client.ICONS_IN_TOOLBAR);
function initStatic(){ var obj; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger", client.munger.enabled); setMenuCheck ("menu-viewicons", client.ICONS_IN_TOOLBAR); client.uiState["toolbar"] = setMenuCheck ("menu-view-toolbar", isVisible("views-tbar")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display ("Welcome to ChatZilla...\n" + "Use /attach <network-name> connect to a network.\n" + "Where <network-name> is one of [" + keys (client.networks) + "]\n" + "More help is available with /help [<command-name>]", "HELLO"); setCurrentObject (client); client.onInputCommands(); var ary = client.INITIAL_URLS.split(";"); for (var i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) { if (ary[i].indexOf("irc://") != 0) ary[i] = "irc://" + ary[i]; gotoIRCURL (ary[i]); } } ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); if (document.location.search) gotoIRCURL (document.location.search.substr(1)); }
"Use /attach <network-name> connect to a network.\n" + "Where <network-name> is one of [" + keys (client.networks) + "]\n" + "More help is available with /help [<command-name>]", "HELLO");
"Use /attach <network-name> connect to a network, or " + "click on one of the network names below.\n" + "For general IRC help and FAQs, please go to " + "<http:
function initStatic(){ var obj; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger", client.munger.enabled); setMenuCheck ("menu-viewicons", client.ICONS_IN_TOOLBAR); client.uiState["toolbar"] = setMenuCheck ("menu-view-toolbar", isVisible("views-tbar")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display ("Welcome to ChatZilla...\n" + "Use /attach <network-name> connect to a network.\n" + "Where <network-name> is one of [" + keys (client.networks) + "]\n" + "More help is available with /help [<command-name>]", "HELLO"); setCurrentObject (client); client.onInputCommands(); var ary = client.INITIAL_URLS.split(";"); for (var i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) { if (ary[i].indexOf("irc://") != 0) ary[i] = "irc://" + ary[i]; gotoIRCURL (ary[i]); } } ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); if (document.location.search) gotoIRCURL (document.location.search.substr(1)); }
gotoIRCURL (document.location.search.substr(1));
gotoIRCURL (document.location.search.substr(1)); setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT);
function initStatic(){ var obj; obj = document.getElementById("input"); obj.addEventListener("keyup", onInputKeyUp, false); window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger", client.munger.enabled); setMenuCheck ("menu-viewicons", client.ICONS_IN_TOOLBAR); client.uiState["toolbar"] = setMenuCheck ("menu-view-toolbar", isVisible("views-tbar")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar-tbar")); client.statusBar = new Object(); client.statusBar["net-name"] = document.getElementById ("net-name"); client.statusBar["server-name"] = document.getElementById ("server-name"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["server-lag"] = document.getElementById ("server-lag"); client.statusBar["last-ping"] = document.getElementById ("last-ping"); client.statusBar["channel-name"] = document.getElementById ("channel-name"); client.statusBar["channel-limit"] = document.getElementById ("channel-limit"); client.statusBar["channel-key"] = document.getElementById ("channel-key"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicby"] = document.getElementById ("channel-topicby"); onSortCol ("usercol-nick"); client.display ("Welcome to ChatZilla...\n" + "Use /attach <network-name> connect to a network.\n" + "Where <network-name> is one of [" + keys (client.networks) + "]\n" + "More help is available with /help [<command-name>]", "HELLO"); setCurrentObject (client); client.onInputCommands(); var ary = client.INITIAL_URLS.split(";"); for (var i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) { if (ary[i].indexOf("irc://") != 0) ary[i] = "irc://" + ary[i]; gotoIRCURL (ary[i]); } } ary = client.INITIAL_VICTIMS.split(";"); for (i in ary) { ary[i] = stringTrim(ary[i]); if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); if (document.location.search) gotoIRCURL (document.location.search.substr(1)); }
client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(/\s*;\s*/); for (i in ary) { if (ary[i]) client.stalkingVictims.push (ary[i]); }
function initStatic(){ var obj; const nsISound = Components.interfaces.nsISound; client.sound = Components.classes["@mozilla.org/sound;1"].createInstance(nsISound); if (client.CHARSET) setCharset(client.CHARSET); var ary = navigator.userAgent.match (/;\s*([^;\s]+\s*)\).*\/(\d+)/); if (ary) client.userAgent = "ChatZilla " + client.version + " [Mozilla " + ary[1] + "/" + ary[2] + "]"; else client.userAgent = "ChatZilla " + client.version + " [" + navigator.userAgent + "]"; obj = document.getElementById("input"); obj.addEventListener("keypress", onInputKeyPress, false); obj = document.getElementById("multiline-input"); obj.addEventListener("keypress", onMultilineInputKeyPress, false); obj = document.getElementById("channel-topicedit"); obj.addEventListener("keypress", onTopicKeyPress, false); obj.active = false; window.onkeypress = onWindowKeyPress; setMenuCheck ("menu-dmessages", client.eventPump.getHook ("event-tracer").enabled); setMenuCheck ("menu-munger-global", !client.munger.enabled); setMenuCheck ("menu-colors", client.enableColors); setupMungerMenu(client.munger); client.uiState["tabstrip"] = setMenuCheck ("menu-view-tabstrip", isVisible("view-tabs")); client.uiState["info"] = setMenuCheck ("menu-view-info", isVisible("user-list-box")); client.uiState["header"] = setMenuCheck ("menu-view-header", isVisible("header-bar-tbox")); client.uiState["status"] = setMenuCheck ("menu-view-status", isVisible("status-bar")); client.statusBar = new Object(); client.statusBar["header-url"] = document.getElementById ("header-url"); client.statusBar["server-nick"] = document.getElementById ("server-nick"); client.statusBar["channel-mode"] = document.getElementById ("channel-mode"); client.statusBar["channel-users"] = document.getElementById ("channel-users"); client.statusBar["channel-topic"] = document.getElementById ("channel-topic"); client.statusBar["channel-topicedit"] = document.getElementById ("channel-topicedit"); client.statusElement = document.getElementById ("status-text"); client.defaultStatus = getMsg ("defaultStatus"); onSortCol ("usercol-nick"); client.display (getMsg("welcome"), "HELLO"); setCurrentObject (client); client.onInputNetworks(); client.onInputCommands(); ary = client.INITIAL_VICTIMS.split(/\s*;\s*/); for (i in ary) { if (ary[i]) client.stalkingVictims.push (ary[i]); } var m = document.getElementById ("menu-settings-autosave"); m.setAttribute ("checked", String(client.SAVE_SETTINGS)); setInterval ("onNotifyTimeout()", client.NOTIFY_TIMEOUT); }
this.mPercentComplete = 0;
this.mPercentComplete = undefined;
initTodo: function () { this.mEntryDate = new CalDateTime(); this.mDueDate = new CalDateTime(); this.mCompletedDate = new CalDateTime(); this.mPercentComplete = 0; },
this.showItem( "context-blockimage", this.onImage && this.isBlockingImages() ); this.showItem( "context-capture", this.okToCapture() ); this.setItemAttr( "context-capture", "disabled", this.disableCapture); this.showItem( "context-prefill", this.okToPrefill() ); this.setItemAttr( "context-prefill", "disabled", this.disablePrefill);
initViewItems : function () { // View source is always OK, unless in directory listing. this.showItem( "context-viewsource", !this.inDirList ); // View frame source depends on whether we're in a frame. this.showItem( "context-viewframesource", this.inFrame ); // View Info don't work no way no how. this.showItem( "context-viewinfo", false ); // View Frame Info isn't working, either. this.showItem( "context-viewframeinfo", false ); // View Image depends on whether an image was clicked on. this.showItem( "context-viewimage", this.onImage ); // Block image depends on whether an image was clicked on, and, // whether the user pref is enabled. this.showItem( "context-blockimage", this.onImage && this.isBlockingImages() ); // Capture depends on whether a form is being displayed. this.showItem( "context-capture", this.okToCapture() ); this.setItemAttr( "context-capture", "disabled", this.disableCapture); // Prefill depends on whether a form is being displayed. this.showItem( "context-prefill", this.okToPrefill() ); this.setItemAttr( "context-prefill", "disabled", this.disablePrefill); // Remove separator if all items are removed. this.showItem( "context-sep-view", !this.inDirList || this.inFrame || this.onImage ); },
this.showItem( "context-viewpartialsource-selection", this.isTextSelected );
this.showItem( "context-viewpartialsource-selection", this.isTextSelected && !this.onTextInput );
initViewItems : function () { // View source is always OK, unless in directory listing. this.showItem( "context-viewpartialsource-selection", this.isTextSelected ); this.showItem( "context-viewpartialsource-mathml", this.onMathML && !this.isTextSelected ); this.showItem( "context-viewsource", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-viewinfo", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-sep-properties", !( this.inDirList || this.isTextSelected || this.onTextInput ) ); // Set As Wallpaper depends on whether an image was clicked on, and only works on Windows. var isWin = navigator.appVersion.indexOf("Windows") != -1; this.showItem( "context-setWallpaper", isWin && this.onImage ); this.showItem( "context-sep-image", this.onImage ); if( isWin && this.onImage ) // Disable the Set As Wallpaper menu item if we're still trying to load the image this.setItemAttr( "context-setWallpaper", "disabled", (("complete" in this.target) && !this.target.complete) ? "true" : null ); // View Image depends on whether an image was clicked on. this.showItem( "context-viewimage", this.onImage ); // View background image depends on whether there is one. this.showItem( "context-viewbgimage", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-sep-viewbgimage", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.setItemAttr( "context-viewbgimage", "disabled", this.hasBGImage ? null : "true"); },
this.showItem( "context-viewsource", !this.inDirList );
this.showItem( "context-viewsource", !( this.inDirList || this.onImage ) );
initViewItems : function () { // View source is always OK, unless in directory listing. this.showItem( "context-viewsource", !this.inDirList ); // View frame source depends on whether we're in a frame. this.showItem( "context-viewframesource", this.inFrame ); // View Info is available, unless in directory listing this.showItem( "context-viewinfo", !this.inDirList ); // View Frame Info depends on whether we're in a frame this.showItem( "context-viewframeinfo", this.inFrame ); // View Image depends on whether an image was clicked on. this.showItem( "context-viewimage", this.onImage ); // Remove separator if all items are removed. this.showItem( "context-sep-view", !this.inDirList || this.inFrame || this.onImage ); },
this.showItem( "context-viewsource", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-viewinfo", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) );
var showView = !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ); this.showItem( "context-viewsource", showView ); this.showItem( "context-viewinfo", showView );
initViewItems : function () { // View source is always OK, unless in directory listing. this.showItem( "context-viewpartialsource-selection", this.isTextSelected && !this.onTextInput ); this.showItem( "context-viewpartialsource-mathml", this.onMathML && !this.isTextSelected ); this.showItem( "context-viewsource", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-viewinfo", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-sep-properties", !( this.inDirList || this.isTextSelected || this.onTextInput ) ); // Set As Wallpaper depends on whether an image was clicked on, and only works on Windows. var isWin = navigator.appVersion.indexOf("Windows") != -1; this.showItem( "context-setWallpaper", isWin && this.onImage ); this.showItem( "context-sep-image", this.onImage ); if( isWin && this.onImage ) // Disable the Set As Wallpaper menu item if we're still trying to load the image this.setItemAttr( "context-setWallpaper", "disabled", (("complete" in this.target) && !this.target.complete) ? "true" : null ); this.showItem( "context-fitimage", this.onStandaloneImage && _content.document.imageResizingEnabled ); if ( this.onStandaloneImage && _content.document.imageResizingEnabled ) { this.setItemAttr( "context-fitimage", "disabled", _content.document.imageIsOverflowing ? null : "true"); this.setItemAttr( "context-fitimage", "checked", _content.document.imageIsResized ? "true" : null); } // View Image depends on whether an image was clicked on. this.showItem( "context-viewimage", this.onImage && !this.onStandaloneImage); // View background image depends on whether there is one. this.showItem( "context-viewbgimage", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-sep-viewbgimage", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.setItemAttr( "context-viewbgimage", "disabled", this.hasBGImage ? null : "true"); },
this.showItem( "context-viewbgimage", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-sep-viewbgimage", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) );
this.showItem( "context-viewbgimage", showView ); this.showItem( "context-sep-viewbgimage", showView );
initViewItems : function () { // View source is always OK, unless in directory listing. this.showItem( "context-viewpartialsource-selection", this.isTextSelected && !this.onTextInput ); this.showItem( "context-viewpartialsource-mathml", this.onMathML && !this.isTextSelected ); this.showItem( "context-viewsource", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-viewinfo", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-sep-properties", !( this.inDirList || this.isTextSelected || this.onTextInput ) ); // Set As Wallpaper depends on whether an image was clicked on, and only works on Windows. var isWin = navigator.appVersion.indexOf("Windows") != -1; this.showItem( "context-setWallpaper", isWin && this.onImage ); this.showItem( "context-sep-image", this.onImage ); if( isWin && this.onImage ) // Disable the Set As Wallpaper menu item if we're still trying to load the image this.setItemAttr( "context-setWallpaper", "disabled", (("complete" in this.target) && !this.target.complete) ? "true" : null ); this.showItem( "context-fitimage", this.onStandaloneImage && _content.document.imageResizingEnabled ); if ( this.onStandaloneImage && _content.document.imageResizingEnabled ) { this.setItemAttr( "context-fitimage", "disabled", _content.document.imageIsOverflowing ? null : "true"); this.setItemAttr( "context-fitimage", "checked", _content.document.imageIsResized ? "true" : null); } // View Image depends on whether an image was clicked on. this.showItem( "context-viewimage", this.onImage && !this.onStandaloneImage); // View background image depends on whether there is one. this.showItem( "context-viewbgimage", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-sep-viewbgimage", !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ) ); this.setItemAttr( "context-viewbgimage", "disabled", this.hasBGImage ? null : "true"); },
this.showItem( "context-blockimage", this.onImage && this.isBlockingImages() );
initViewItems : function () { // View source is always OK. // View frame source depends on whether we're in a frame. this.showItem( "context-viewframesource", this.inFrame ); // View Info don't work no way no how. this.showItem( "context-viewinfo", false ); // View Frame Info isn't working, either. this.showItem( "context-viewframeinfo", false ); // View Image depends on whether an image was clicked on. this.showItem( "context-viewimage", this.onImage ); },
else if (makeURI(this.target.src).scheme == "javascript") disableDesktopBackground = true;
initViewItems : function () { // View source is always OK, unless in directory listing. this.showItem( "context-viewpartialsource-selection", this.isContentSelected ); this.showItem( "context-viewpartialsource-mathml", this.onMathML && !this.isContentSelected ); this.showItem( "context-viewsource", !( this.inDirList || this.onImage || this.isContentSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-viewinfo", !( this.inDirList || this.onImage || this.isContentSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-sep-properties", !( this.inDirList || this.isContentSelected || this.onTextInput ) ); // Set as Desktop background depends on whether an image was clicked on, // and only works if we have a shell service. var haveSetDesktopBackground = false;#ifdef HAVE_SHELL_SERVICE // Only enable Set as Desktop Background if we can get the shell service. var shell = getShellService(); if (shell) haveSetDesktopBackground = true;#endif this.showItem( "context-setDesktopBackground", haveSetDesktopBackground && this.onImage ); if ( haveSetDesktopBackground && this.onImage ) { // Disable the Set as Desktop Background menu item if we're still trying // to load the image or the load failed const nsIImageLoadingContent = Components.interfaces.nsIImageLoadingContent; var disableDesktopBackground = false; if (("complete" in this.target) && !this.target.complete) disableSetWallpaper = true; else if (this.target instanceof nsIImageLoadingContent) { var request = this.target.QueryInterface(nsIImageLoadingContent) .getRequest(nsIImageLoadingContent.CURRENT_REQUEST); if (!request) disableDesktopBackground = true; } else if (makeURI(this.target.src).scheme == "javascript") disableDesktopBackground = true; this.setItemAttr( "context-setDesktopBackground", "disabled", disableDesktopBackground); } // View Image depends on whether an image was clicked on. this.showItem( "context-viewimage", this.onImage && !this.onStandaloneImage ); // View background image depends on whether there is one. this.showItem( "context-viewbgimage", !( this.inDirList || this.onImage || this.isContentSelected || this.onLink || this.onTextInput ) ); this.showItem( "context-sep-viewbgimage", !( this.inDirList || this.onImage || this.isContentSelected || this.onLink || this.onTextInput ) ); this.setItemAttr( "context-viewbgimage", "disabled", this.hasBGImage ? null : "true"); },
this.setItemAttr( "context-capture", "disabled", this.disableCapture);
initViewItems : function () { // View source is always OK, unless in directory listing. this.showItem( "context-viewsource", !this.inDirList ); // View frame source depends on whether we're in a frame. this.showItem( "context-viewframesource", this.inFrame ); // View Info don't work no way no how. this.showItem( "context-viewinfo", false ); // View Frame Info isn't working, either. this.showItem( "context-viewframeinfo", false ); // View Image depends on whether an image was clicked on. this.showItem( "context-viewimage", this.onImage ); // Block image depends on whether an image was clicked on, and, // whether the user pref is enabled. this.showItem( "context-blockimage", this.onImage && this.isBlockingImages() ); // Capture depends on whether a form is being displayed. this.showItem( "context-capture", this.okToCapture() ); // Prefill depends on whether a form is being displayed. this.showItem( "context-prefill", this.okToPrefill() ); // Remove separator if all items are removed. this.showItem( "context-sep-view", !this.inDirList || this.inFrame || this.onImage ); },
this.showItem( "context-viewpartialsource-selection", this.isTextSelected && !this.onTextInput ); this.showItem( "context-viewpartialsource-mathml", this.onMathML && !this.isTextSelected );
this.showItem( "context-viewpartialsource-selection", this.isContentSelected && !this.onTextInput ); this.showItem( "context-viewpartialsource-mathml", this.onMathML && !this.isContentSelected );
initViewItems : function () { // View source is always OK, unless in directory listing. this.showItem( "context-viewpartialsource-selection", this.isTextSelected && !this.onTextInput ); this.showItem( "context-viewpartialsource-mathml", this.onMathML && !this.isTextSelected ); var showView = !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ); this.showItem( "context-viewsource", showView ); this.showItem( "context-viewinfo", showView ); this.showItem( "context-sep-properties", !( this.inDirList || this.isTextSelected || this.onTextInput ) ); // Set As Wallpaper depends on whether an image was clicked on, and only works on Windows. var isWin = navigator.appVersion.indexOf("Windows") != -1; this.showItem( "context-setWallpaper", isWin && (this.onLoadedImage || this.onStandaloneImage)); this.showItem( "context-sep-image", this.onLoadedImage || this.onStandaloneImage); if( isWin && this.onLoadedImage ) // Disable the Set As Wallpaper menu item if we're still trying to load the image this.setItemAttr( "context-setWallpaper", "disabled", (("complete" in this.target) && !this.target.complete) ? "true" : null ); this.showItem( "context-fitimage", this.onStandaloneImage && content.document.imageResizingEnabled ); if ( this.onStandaloneImage && content.document.imageResizingEnabled ) { this.setItemAttr( "context-fitimage", "disabled", content.document.imageIsOverflowing ? null : "true"); this.setItemAttr( "context-fitimage", "checked", content.document.imageIsResized ? "true" : null); } this.showItem( "context-reloadimage", this.onImage); // View Image depends on whether an image was clicked on. this.showItem( "context-viewimage", this.onImage && !this.onStandaloneImage); // View background image depends on whether there is one. this.showItem( "context-viewbgimage", showView && !this.onStandaloneImage); this.showItem( "context-sep-viewbgimage", showView && !this.onStandaloneImage); this.setItemAttr( "context-viewbgimage", "disabled", this.hasBGImage ? null : "true"); },
var showView = !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput );
var showView = !( this.inDirList || this.onImage || this.isContentSelected || this.onLink || this.onTextInput );
initViewItems : function () { // View source is always OK, unless in directory listing. this.showItem( "context-viewpartialsource-selection", this.isTextSelected && !this.onTextInput ); this.showItem( "context-viewpartialsource-mathml", this.onMathML && !this.isTextSelected ); var showView = !( this.inDirList || this.onImage || this.isTextSelected || this.onLink || this.onTextInput ); this.showItem( "context-viewsource", showView ); this.showItem( "context-viewinfo", showView ); this.showItem( "context-sep-properties", !( this.inDirList || this.isTextSelected || this.onTextInput ) ); // Set As Wallpaper depends on whether an image was clicked on, and only works on Windows. var isWin = navigator.appVersion.indexOf("Windows") != -1; this.showItem( "context-setWallpaper", isWin && (this.onLoadedImage || this.onStandaloneImage)); this.showItem( "context-sep-image", this.onLoadedImage || this.onStandaloneImage); if( isWin && this.onLoadedImage ) // Disable the Set As Wallpaper menu item if we're still trying to load the image this.setItemAttr( "context-setWallpaper", "disabled", (("complete" in this.target) && !this.target.complete) ? "true" : null ); this.showItem( "context-fitimage", this.onStandaloneImage && content.document.imageResizingEnabled ); if ( this.onStandaloneImage && content.document.imageResizingEnabled ) { this.setItemAttr( "context-fitimage", "disabled", content.document.imageIsOverflowing ? null : "true"); this.setItemAttr( "context-fitimage", "checked", content.document.imageIsResized ? "true" : null); } this.showItem( "context-reloadimage", this.onImage); // View Image depends on whether an image was clicked on. this.showItem( "context-viewimage", this.onImage && !this.onStandaloneImage); // View background image depends on whether there is one. this.showItem( "context-viewbgimage", showView && !this.onStandaloneImage); this.showItem( "context-sep-viewbgimage", showView && !this.onStandaloneImage); this.setItemAttr( "context-viewbgimage", "disabled", this.hasBGImage ? null : "true"); },