%notificationDTD; %browserDTD; %brandDTD; ]> (Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants; #ifdef MOZ_WEBEXTENSIONS (Components.utils.import("resource://gre/modules/ExtensionSearchHandler.jsm", {})).ExtensionSearchHandler; #endif "" false null 255 true true { if (where != "current" || browser.lastLocationChange == lastLocationChange) { this._loadURL(data.url, browser, data.postData, where, openUILinkParams, data.mayInheritPrincipal); } }); return; } } this._loadURL(url, browser, postData, where, openUILinkParams, mayInheritPrincipal); ]]> = 0) { url = url.substring(0, firstSlash) + suffix + url.substring(firstSlash + 1); } else { url = url + suffix; } this.popup.overrideValue = "http://www." + url; ]]> false 0 && links[0].url) { aEvent.preventDefault(); let url = links[0].url; let strippedURL = stripUnsafeProtocolOnPaste(url); if (strippedURL != url) { aEvent.stopImmediatePropagation(); return null; } try { urlSecurityCheck(url, gBrowser.contentPrincipal, Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL); } catch (ex) { return null; } return url; } return null; ]]> 0 || this.valueIsTyped || selectedVal == "") return selectedVal; // The selection doesn't span the full domain if it doesn't contain a slash and is // followed by some character other than a slash. if (!selectedVal.includes("/")) { let remainder = inputVal.replace(selectedVal, ""); if (remainder != "" && remainder[0] != "/") return selectedVal; } let uriFixup = Cc["@mozilla.org/docshell/urifixup;1"].getService(Ci.nsIURIFixup); let uri; if (this.getAttribute("pageproxystate") == "valid") { uri = gBrowser.currentURI; } else { // We're dealing with an autocompleted value, create a new URI from that. try { uri = uriFixup.createFixupURI(inputVal, Ci.nsIURIFixup.FIXUP_FLAG_NONE); } catch (e) {} if (!uri) return selectedVal; } // Avoid copying 'about:reader?url=', and always provide the original URI: let readerOriginalURL = ReaderMode.getOriginalUrl(uri.spec); if (readerOriginalURL) { uri = uriFixup.createFixupURI(readerOriginalURL, Ci.nsIURIFixup.FIXUP_FLAG_NONE); } // Only copy exposable URIs try { uri = uriFixup.createExposableURI(uri); } catch (ex) {} // If the entire URL is selected, just use the actual loaded URI. if (inputVal == selectedVal) { // ... but only if isn't a javascript: or data: URI, since those // are hard to read when encoded if (!uri.schemeIs("javascript") && !uri.schemeIs("data")) { selectedVal = uri.spec; } return selectedVal; } // Just the beginning of the URL is selected, check for a trimmed // value let spec = uri.spec; let trimmedSpec = this.trimValue(spec); if (spec != trimmedSpec) { // Prepend the portion that trimValue removed from the beginning. // This assumes trimValue will only truncate the URL at // the beginning or end (or both). let trimmedSegments = spec.split(trimmedSpec); selectedVal = trimmedSegments[0] + selectedVal; } return selectedVal; ]]> = 0 && !this._pressedNoActionKeys.has(event.keyCode)) { if (this._pressedNoActionKeys.size == 0) { this.popup.setAttribute("noactions", "true"); this.removeAttribute("actiontype"); } this._pressedNoActionKeys.add(event.keyCode); } ]]> " + urlString + ""; var dt = event.dataTransfer; dt.setData("text/x-moz-url", urlString + "\n" + title); dt.setData("text/unicode", urlString); dt.setData("text/html", htmlString); dt.effectAllowed = "copyLink"; event.stopPropagation(); ]]> (Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants; &urlbar.searchSuggestionsNotification.question; 0 Cc["@mozilla.org/intl/stringbundle;1"]. getService(Ci.nsIStringBundleService). createBundle("chrome://browser/locale/places/places.properties"); document.getAnonymousElementByAttribute( this, "anonid", "search-suggestions-notification" ); document.getAnonymousElementByAttribute(this, "anonid", "footer"); document.getAnonymousElementByAttribute(this, "anonid", "one-off-search-buttons"); false null maxRow && index != maxRow) newIndex = maxRow; else if (!reverse && index == -1 || newIndex < 0 && index != 0) newIndex = 0; if (newIndex < 0 && index == 0 || newIndex > maxRow && index == maxRow) newIndex = -1; return newIndex; } // Otherwise do not allow the selection to be removed. if (newIndex < 0) { newIndex = index > 0 ? 0 : maxRow; } else if (newIndex > maxRow) { newIndex = index < maxRow ? maxRow : 0; } return newIndex; ]]> 0 && this.input.mController .getStyleAt(0) .split(/\s+/).indexOf("heuristic") > 0; ]]> n.id == "urlbar-container"); let alignSiteIcons = urlbarPosition <= 2 && nodes.slice(0, urlbarPosition) .every(n => n.localName == "toolbarbutton"); if (alignSiteIcons) { let identityRect = document.getElementById("identity-icon").getBoundingClientRect(); this.siteIconStart = popupDirection == "rtl" ? identityRect.right : identityRect.left; } else { // Reset the alignment so that the site icons are positioned // according to whatever's in the CSS. this.siteIconStart = undefined; } // Position the popup below the navbar. To get the y-coordinate, // which is an offset from the bottom of the input, subtract the // bottom of the navbar from the buttom of the input. let yOffset = document.getElementById("nav-bar").getBoundingClientRect().bottom - aInput.getBoundingClientRect().bottom; this.openPopup(aElement, "after_start", 0, yOffset, false, false); ]]> { if (enableSuggestions && this.input.textValue) { // Start a new search so that suggestions appear immediately. this.input.controller.startSearch(this.input.textValue); } }); ]]> { let notificationHeight = this.searchSuggestionsNotification .getBoundingClientRect() .height; this.searchSuggestionsNotification.style.marginTop = "-" + notificationHeight + "px"; let popupHeightPx = (this.getBoundingClientRect().height - notificationHeight) + "px"; this.style.height = popupHeightPx; let onTransitionEnd = () => { this.removeEventListener("transitionend", onTransitionEnd, true); this.searchSuggestionsNotification.style.marginTop = "0px"; this.style.removeProperty("height"); this._hideSearchSuggestionsNotification(); resolve(); }; this.addEventListener("transitionend", onTransitionEnd, true); }); ]]> type != "action" && type != "heuristic"); try { // Some types intentionally do not map to strings, which is not // an error. parts.push(this._bundle.GetStringFromName(type + "ResultLabel")); } catch (e) {} return parts.filter(str => str).join(" "); ]]> { // Safety check: handle only if the search string didn't change. let { event, searchString } = instance; if (this.input.mController.searchString == searchString) { this.input.maybeCanonizeURL(event, searchString); this.input.mController.handleEnter(false, event); this.overrideValue = null; } }, 0); } ]]> document.getElementById("addon-progress-notification-progressmeter"); document.getElementById("addon-progress-notification-progresstext"); = 0) maxProgress += aInstall.maxProgress; if (aInstall.state < AddonManager.STATE_DOWNLOADED) downloadingCount++; }); if (downloadingCount == 0) { this.destroy(); if (Preferences.get("xpinstall.customConfirmationUI", false)) { this.progressmeter.setAttribute("mode", "undetermined"); let status = gNavigatorBundle.getString("addonDownloadVerifying"); this.progresstext.setAttribute("value", status); this.progresstext.setAttribute("tooltiptext", status); } else { PopupNotifications.remove(this.notification); } } else { this.setProgress(progress, maxProgress); } ]]> return document.getAnonymousElementByAttribute(this, "anonid", "center-item-menulist").value; document.getAnonymousElementByAttribute(this, "anonid", "center-item-menulist").value = val; ({SINGLE: 0, MULTI_COLLAPSED: 1, MULTI_EXPANDED: 2}) document.getAnonymousElementByAttribute(this, "anonid", "primarybutton"); document.getAnonymousElementByAttribute(this, "anonid", "secondarybutton") document.getAnonymousElementByAttribute(this, "anonid", "button-container") document.getElementById("bundle_brand").getString("brandShortName") [] a.pluginName.localeCompare(b.pluginName)); for (let action of sortedActions) { let item = document.createElementNS(XUL_NS, "row"); item.setAttribute("class", "plugin-popupnotification-centeritem"); item.action = action; this.appendChild(item); this._items.push(item); } switch (this._items.length) { case 0: PopupNotifications._dismiss(); break; case 1: this._setState(this._states.SINGLE); break; default: if (this.notification.options.primaryPlugin) { this._setState(this._states.MULTI_COLLAPSED); } else { this._setState(this._states.MULTI_EXPANDED); } } ]]> document.getAnonymousElementByAttribute(this, "anonid", "menuitem"); document.getAnonymousElementByAttribute(this, "anonid", "menu"); 600