utilityOverlay.js
Go to the documentation of this file.
1 # -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 # ***** BEGIN LICENSE BLOCK *****
3 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 #
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
8 # http://www.mozilla.org/MPL/
9 #
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
13 # License.
14 #
15 # The Original Code is mozilla.org code.
16 #
17 # The Initial Developer of the Original Code is
18 # Netscape Communications Corporation.
19 # Portions created by the Initial Developer are Copyright (C) 1998
20 # the Initial Developer. All Rights Reserved.
21 #
22 # Contributor(s):
23 # Alec Flett <alecf@netscape.com>
24 # Ehsan Akhgari <ehsan.akhgari@gmail.com>
25 #
26 # Alternatively, the contents of this file may be used under the terms of
27 # either the GNU General Public License Version 2 or later (the "GPL"), or
28 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 # in which case the provisions of the GPL or the LGPL are applicable instead
30 # of those above. If you wish to allow use of your version of this file only
31 # under the terms of either the GPL or the LGPL, and not to allow others to
32 # use your version of this file under the terms of the MPL, indicate your
33 # decision by deleting the provisions above and replace them with the notice
34 # and other provisions required by the GPL or the LGPL. If you do not delete
35 # the provisions above, a recipient may use your version of this file under
36 # the terms of any one of the MPL, the GPL or the LGPL.
37 #
38 # ***** END LICENSE BLOCK *****
39 
45 var TAB_DROP_TYPE = "application/x-moz-tabbrowser-tab";
46 
47 var gBidiUI = false;
48 
49 function getBrowserURL()
50 {
51  return "chrome://browser/content/browser.xul";
52 }
53 
54 function goToggleToolbar( id, elementID )
55 {
56  var toolbar = document.getElementById(id);
57  var element = document.getElementById(elementID);
58  if (toolbar)
59  {
60  var isHidden = toolbar.hidden;
61  toolbar.hidden = !isHidden;
62  document.persist(id, 'hidden');
63  if (element) {
64  element.setAttribute("checked", isHidden ? "true" : "false");
65  document.persist(elementID, 'checked');
66  }
67  }
68 }
69 
70 function getTopWin()
71 {
72  var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1']
73  .getService(Components.interfaces.nsIWindowMediator);
74  return windowManager.getMostRecentWindow("navigator:browser");
75 }
76 
77 function openTopWin( url )
78 {
79  openUILink(url, {})
80 }
81 
82 function getBoolPref ( prefname, def )
83 {
84  try {
85  var pref = Components.classes["@mozilla.org/preferences-service;1"]
86  .getService(Components.interfaces.nsIPrefBranch);
87  return pref.getBoolPref(prefname);
88  }
89  catch(er) {
90  return def;
91  }
92 }
93 
94 // Change focus for this browser window to |aElement|, without focusing the
95 // window itself.
96 function focusElement(aElement)
97 {
98  var msg;
99 
100  // if a content window, focus the <browser> instead as window.focus()
101  // raises the window
102  if (aElement instanceof Window) {
103  var browser = getBrowserFromContentWindow(aElement);
104  if (!browser)
105  throw "aElement is not a content window";
106  browser.focus();
107  msg = "focusElement(content) is deprecated. Use gBrowser.selectedBrowser.focus() instead.";
108  }
109  else {
110  aElement.focus();
111  msg = "focusElement(element) is deprecated. Use element.focus() instead.";
112  }
113 
114  var scriptError = Components.classes["@mozilla.org/scripterror;1"]
115  .createInstance(Components.interfaces.nsIScriptError);
116  scriptError.init(msg, document.location.href, null, null,
117  null, scriptError.warningFlag, "chrome javascript");
118  Components.classes["@mozilla.org/consoleservice;1"]
119  .getService(Components.interfaces.nsIConsoleService)
120  .logMessage(scriptError);
121 }
122 
123 // openUILink handles clicks on UI elements that cause URLs to load.
124 function openUILink( url, e, ignoreButton, ignoreAlt, allowKeywordFixup, postData, referrerUrl )
125 {
126  var where = whereToOpenLink(e, ignoreButton, ignoreAlt);
127  openUILinkIn(url, where, allowKeywordFixup, postData, referrerUrl);
128 }
129 
130 
131 /* whereToOpenLink() looks at an event to decide where to open a link.
132  *
133  * The event may be a mouse event (click, double-click, middle-click) or keypress event (enter).
134  *
135  * On Windows, the modifiers are:
136  * Ctrl new tab, selected
137  * Shift new window
138  * Ctrl+Shift new tab, in background
139  * Alt save
140  *
141  * You can swap Ctrl and Ctrl+shift by toggling the hidden pref
142  * browser.tabs.loadBookmarksInBackground (not browser.tabs.loadInBackground, which
143  * is for content area links).
144  *
145  * Middle-clicking is the same as Ctrl+clicking (it opens a new tab) and it is
146  * subject to the shift modifier and pref in the same way.
147  *
148  * Exceptions:
149  * - Alt is ignored for menu items selected using the keyboard so you don't accidentally save stuff.
150  * (Currently, the Alt isn't sent here at all for menu items, but that will change in bug 126189.)
151  * - Alt is hard to use in context menus, because pressing Alt closes the menu.
152  * - Alt can't be used on the bookmarks toolbar because Alt is used for "treat this as something draggable".
153  * - The button is ignored for the middle-click-paste-URL feature, since it's always a middle-click.
154  */
155 function whereToOpenLink( e, ignoreButton, ignoreAlt )
156 {
157  // This method must treat a null event like a left click without modifier keys (i.e.
158  // e = { shiftKey:false, ctrlKey:false, metaKey:false, altKey:false, button:0 })
159  // for compatibility purposes.
160  if (!e)
161  return "current";
162 
163  var shift = e.shiftKey;
164  var ctrl = e.ctrlKey;
165  var meta = e.metaKey;
166  var alt = e.altKey && !ignoreAlt;
167 
168  // ignoreButton allows "middle-click paste" to use function without always opening in a new window.
169  var middle = !ignoreButton && e.button == 1;
170  var middleUsesTabs = getBoolPref("browser.tabs.opentabfor.middleclick", true);
171 
172  // Don't do anything special with right-mouse clicks. They're probably clicks on context menu items.
173 
174 #ifdef XP_MACOSX
175  if (meta || (middle && middleUsesTabs)) {
176 #else
177  if (ctrl || (middle && middleUsesTabs)) {
178 #endif
179  if (shift)
180  return "tabshifted";
181  else
182  return "tab";
183  }
184  else if (alt) {
185  return "save";
186  }
187  else if (shift || (middle && !middleUsesTabs)) {
188  return "window";
189  }
190  else {
191  return "current";
192  }
193 }
194 
195 /* openUILinkIn opens a URL in a place specified by the parameter |where|.
196  *
197  * |where| can be:
198  * "current" current tab (if there aren't any browser windows, then in a new window instead)
199  * "tab" new tab (if there aren't any browser windows, then in a new window instead)
200  * "tabshifted" same as "tab" but in background if default is to select new tabs, and vice versa
201  * "window" new window
202  * "save" save to disk (with no filename hint!)
203  *
204  * allowThirdPartyFixup controls whether third party services such as Google's
205  * I Feel Lucky are allowed to interpret this URL. This parameter may be
206  * undefined, which is treated as false.
207  */
208 function openUILinkIn( url, where, allowThirdPartyFixup, postData, referrerUrl )
209 {
210  if (!where || !url)
211  return;
212 
213  if (where == "save") {
214  saveURL(url, null, null, true, null, referrerUrl);
215  return;
216  }
217  const Cc = Components.classes;
218  const Ci = Components.interfaces;
219 
220  var w = getTopWin();
221 
222  if (!w || where == "window") {
223  var sa = Cc["@mozilla.org/supports-array;1"].
224  createInstance(Ci.nsISupportsArray);
225 
226  var wuri = Cc["@mozilla.org/supports-string;1"].
227  createInstance(Ci.nsISupportsString);
228  wuri.data = url;
229 
230  sa.AppendElement(wuri);
231  sa.AppendElement(null);
232  sa.AppendElement(referrerUrl);
233  sa.AppendElement(postData);
234  sa.AppendElement(allowThirdPartyFixup);
235 
236  var ww = Cc["@mozilla.org/embedcomp/window-watcher;1"].
237  getService(Ci.nsIWindowWatcher);
238 
239  ww.openWindow(w || window,
240  getBrowserURL(),
241  null,
242  "chrome,dialog=no,all",
243  sa);
244 
245  return;
246  }
247 
248  var loadInBackground = getBoolPref("browser.tabs.loadBookmarksInBackground", false);
249 
250  switch (where) {
251  case "current":
252  w.loadURI(url, referrerUrl, postData, allowThirdPartyFixup);
253  break;
254  case "tabshifted":
255  loadInBackground = !loadInBackground;
256  // fall through
257  case "tab":
258  let browser = w.getBrowser();
259  browser.loadOneTab(url, {
260  referrerURI: referrerUrl,
261  postData: postData,
262  inBackground: loadInBackground,
263  allowThirdPartyFixup: allowThirdPartyFixup});
264  break;
265  }
266 
267  // If this window is active, focus the target window. Otherwise, focus the
268  // content but don't raise the window, since the URI we just loaded may have
269  // resulted in a new frontmost window (e.g. "javascript:window.open('');").
270  var fm = Components.classes["@mozilla.org/focus-manager;1"].
271  getService(Components.interfaces.nsIFocusManager);
272  if (window == fm.activeWindow)
273  w.content.focus();
274  else
275  w.gBrowser.selectedBrowser.focus();
276 }
277 
278 // Used as an onclick handler for UI elements with link-like behavior.
279 // e.g. onclick="checkForMiddleClick(this, event);"
281  // We should be using the disabled property here instead of the attribute,
282  // but some elements that this function is used with don't support it (e.g.
283  // menuitem).
284  if (node.getAttribute("disabled") == "true")
285  return; // Do nothing
286 
287  if (event.button == 1) {
288  /* Execute the node's oncommand or command.
289  *
290  * XXX: we should use node.oncommand(event) once bug 246720 is fixed.
291  */
292  var target = node.hasAttribute("oncommand") ? node :
293  node.ownerDocument.getElementById(node.getAttribute("command"));
294  var fn = new Function("event", target.getAttribute("oncommand"));
295  fn.call(target, event);
296 
297  // If the middle-click was on part of a menu, close the menu.
298  // (Menus close automatically with left-click but not with middle-click.)
299  closeMenus(event.target);
300  }
301 }
302 
303 // Closes all popups that are ancestors of the node.
304 function closeMenus(node)
305 {
306  if ("tagName" in node) {
307  if (node.namespaceURI == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
308  && (node.tagName == "menupopup" || node.tagName == "popup"))
309  node.hidePopup();
310 
311  closeMenus(node.parentNode);
312  }
313 }
314 
315 // Gather all descendent text under given document node.
316 function gatherTextUnder ( root )
317 {
318  var text = "";
319  var node = root.firstChild;
320  var depth = 1;
321  while ( node && depth > 0 ) {
322  // See if this node is text.
323  if ( node.nodeType == Node.TEXT_NODE ) {
324  // Add this text to our collection.
325  text += " " + node.data;
326  } else if ( node instanceof HTMLImageElement) {
327  // If it has an alt= attribute, use that.
328  var altText = node.getAttribute( "alt" );
329  if ( altText && altText != "" ) {
330  text = altText;
331  break;
332  }
333  }
334  // Find next node to test.
335  // First, see if this node has children.
336  if ( node.hasChildNodes() ) {
337  // Go to first child.
338  node = node.firstChild;
339  depth++;
340  } else {
341  // No children, try next sibling.
342  if ( node.nextSibling ) {
343  node = node.nextSibling;
344  } else {
345  // Last resort is our next oldest uncle/aunt.
346  node = node.parentNode.nextSibling;
347  depth--;
348  }
349  }
350  }
351  // Strip leading whitespace.
352  text = text.replace( /^\s+/, "" );
353  // Strip trailing whitespace.
354  text = text.replace( /\s+$/, "" );
355  // Compress remaining whitespace.
356  text = text.replace( /\s+/g, " " );
357  return text;
358 }
359 
360 function getShellService()
361 {
362  var shell = null;
363  try {
364  shell = Components.classes["@mozilla.org/browser/shell-service;1"]
365  .getService(Components.interfaces.nsIShellService);
366  } catch (e) {dump("*** e = " + e + "\n");}
367  return shell;
368 }
369 
370 function isBidiEnabled() {
371  // first check the pref.
372  if (getBoolPref("bidi.browser.ui", false))
373  return true;
374 
375  // if the pref isn't set, check for an RTL locale and force the pref to true
376  // if we find one.
377  var rv = false;
378 
379  try {
380  var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"]
381  .getService(Components.interfaces.nsILocaleService);
382  var systemLocale = localeService.getSystemLocale().getCategory("NSILOCALE_CTYPE").substr(0,3);
383 
384  switch (systemLocale) {
385  case "ar-":
386  case "he-":
387  case "fa-":
388  case "ur-":
389  case "syr":
390  rv = true;
391  var pref = Components.classes["@mozilla.org/preferences-service;1"]
392  .getService(Components.interfaces.nsIPrefBranch);
393  pref.setBoolPref("bidi.browser.ui", true);
394  }
395  } catch (e) {}
396 
397  return rv;
398 }
399 
400 function openAboutDialog()
401 {
402 #ifdef XP_MACOSX
403  var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
404  .getService(Components.interfaces.nsIWindowMediator);
405  var win = wm.getMostRecentWindow("Browser:About");
406  if (win)
407  win.focus();
408  else {
409  // XXXmano: define minimizable=no although it does nothing on OS X
410  // (see Bug 287162); remove this comment once Bug 287162 is fixed...
411  window.open("chrome://browser/content/aboutDialog.xul", "About",
412  "chrome, resizable=no, minimizable=no");
413  }
414 #else
415  window.openDialog("chrome://browser/content/aboutDialog.xul", "About", "centerscreen,chrome,resizable=no");
416 #endif
417 }
418 
419 function openPreferences(paneID, extraArgs)
420 {
421  var instantApply = getBoolPref("browser.preferences.instantApply", false);
422  var features = "chrome,titlebar,toolbar,centerscreen" + (instantApply ? ",dialog=no" : ",modal");
423 
424  var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
425  .getService(Components.interfaces.nsIWindowMediator);
426  var win = wm.getMostRecentWindow("Browser:Preferences");
427  if (win) {
428  win.focus();
429  if (paneID) {
430  var pane = win.document.getElementById(paneID);
431  win.document.documentElement.showPane(pane);
432  }
433 
434  if (extraArgs && extraArgs["advancedTab"]) {
435  var advancedPaneTabs = win.document.getElementById("advancedPrefs");
436  advancedPaneTabs.selectedTab = win.document.getElementById(extraArgs["advancedTab"]);
437  }
438 
439  return win;
440  }
441 
442  return openDialog("chrome://browser/content/preferences/preferences.xul",
443  "Preferences", features, paneID, extraArgs);
444 }
445 
446 function openAdvancedPreferences(tabID)
447 {
448  return openPreferences("paneAdvanced", { "advancedTab" : tabID });
449 }
450 
455 {
456  var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
457  .getService(Components.interfaces.nsIURLFormatter);
458  var relnotesURL = formatter.formatURLPref("app.releaseNotesURL");
459 
460  openUILinkIn(relnotesURL, "tab");
461 }
462 
468 {
469  openUILinkIn("about:support", "tab");
470 }
471 
472 #ifdef MOZ_UPDATER
473 
476 function checkForUpdates()
477 {
478  var um =
479  Components.classes["@mozilla.org/updates/update-manager;1"].
480  getService(Components.interfaces.nsIUpdateManager);
481  var prompter =
482  Components.classes["@mozilla.org/updates/update-prompt;1"].
483  createInstance(Components.interfaces.nsIUpdatePrompt);
484 
485  // If there's an update ready to be applied, show the "Update Downloaded"
486  // UI instead and let the user know they have to restart the browser for
487  // the changes to be applied.
488  if (um.activeUpdate && um.activeUpdate.state == "pending")
489  prompter.showUpdateDownloaded(um.activeUpdate);
490  else
491  prompter.checkForUpdates();
492 }
493 #endif
494 
495 function buildHelpMenu()
496 {
497  // Enable/disable the "Report Web Forgery" menu item. safebrowsing object
498  // may not exist in OSX
499  if (typeof safebrowsing != "undefined")
500  safebrowsing.setReportPhishingMenu();
501 
502 #ifdef MOZ_UPDATER
503  var updates =
504  Components.classes["@mozilla.org/updates/update-service;1"].
505  getService(Components.interfaces.nsIApplicationUpdateService2);
506  var um =
507  Components.classes["@mozilla.org/updates/update-manager;1"].
508  getService(Components.interfaces.nsIUpdateManager);
509 
510  // Disable the UI if the update enabled pref has been locked by the
511  // administrator or if we cannot update for some other reason
512  var checkForUpdates = document.getElementById("checkForUpdates");
513  var canCheckForUpdates = updates.canCheckForUpdates;
514  checkForUpdates.setAttribute("disabled", !canCheckForUpdates);
515  if (!canCheckForUpdates)
516  return;
517 
518  var strings = document.getElementById("bundle_browser");
519  var activeUpdate = um.activeUpdate;
520 
521  // If there's an active update, substitute its name into the label
522  // we show for this item, otherwise display a generic label.
523  function getStringWithUpdateName(key) {
524  if (activeUpdate && activeUpdate.name)
525  return strings.getFormattedString(key, [activeUpdate.name]);
526  return strings.getString(key + "Fallback");
527  }
528 
529  // By default, show "Check for Updates..."
530  var key = "default";
531  if (activeUpdate) {
532  switch (activeUpdate.state) {
533  case "downloading":
534  // If we're downloading an update at present, show the text:
535  // "Downloading Firefox x.x..." otherwise we're paused, and show
536  // "Resume Downloading Firefox x.x..."
537  key = updates.isDownloading ? "downloading" : "resume";
538  break;
539  case "pending":
540  // If we're waiting for the user to restart, show: "Apply Downloaded
541  // Updates Now..."
542  key = "pending";
543  break;
544  }
545  }
546  checkForUpdates.label = getStringWithUpdateName("updatesItem_" + key);
547  checkForUpdates.accessKey = strings.getString("updatesItem_" + key + ".accesskey");
548  if (um.activeUpdate && updates.isDownloading)
549  checkForUpdates.setAttribute("loading", "true");
550  else
551  checkForUpdates.removeAttribute("loading");
552 #else
553  // Needed by safebrowsing for inserting its menuitem so just hide it
554  document.getElementById("updateSeparator").hidden = true;
555 #endif
556 }
557 
558 function isElementVisible(aElement)
559 {
560  if (!aElement)
561  return false;
562 
563  // If aElement or a direct or indirect parent is hidden or collapsed,
564  // height, width or both will be 0.
565  var bo = aElement.boxObject;
566  return (bo.height > 0 && bo.width > 0);
567 }
568 
569 function makeURLAbsolute(aBase, aUrl)
570 {
571  // Note: makeURI() will throw if aUri is not a valid URI
572  return makeURI(aUrl, null, makeURI(aBase)).spec;
573 }
574 
575 function getBrowserFromContentWindow(aContentWindow)
576 {
577  var browsers = gBrowser.browsers;
578  for (var i = 0; i < browsers.length; i++) {
579  if (browsers[i].contentWindow == aContentWindow)
580  return browsers[i];
581  }
582  return null;
583 }
584 
585 
609 function openNewTabWith(aURL, aDocument, aPostData, aEvent,
610  aAllowThirdPartyFixup, aReferrer)
611 {
612  if (aDocument)
613  urlSecurityCheck(aURL, aDocument.nodePrincipal);
614 
615  var prefSvc = Components.classes["@mozilla.org/preferences-service;1"]
616  .getService(Components.interfaces.nsIPrefService);
617  prefSvc = prefSvc.getBranch(null);
618 
619  // should we open it in a new tab?
620  var loadInBackground = true;
621  try {
622  loadInBackground = prefSvc.getBoolPref("browser.tabs.loadInBackground");
623  }
624  catch(ex) {
625  }
626 
627  if (aEvent && aEvent.shiftKey)
628  loadInBackground = !loadInBackground;
629 
630  // As in openNewWindowWith(), we want to pass the charset of the
631  // current document over to a new tab.
632  var wintype = document.documentElement.getAttribute("windowtype");
633  var originCharset;
634  if (wintype == "navigator:browser")
635  originCharset = window.content.document.characterSet;
636 
637  // open link in new tab
638  var referrerURI = aDocument ? aDocument.documentURIObject : aReferrer;
639  var browser = top.document.getElementById("content");
640  return browser.loadOneTab(aURL, {
641  referrerURI: referrerURI,
642  charset: originCharset,
643  postData: aPostData,
644  inBackground: loadInBackground,
645  allowThirdPartyFixup: aAllowThirdPartyFixup});
646 }
647 
648 function openNewWindowWith(aURL, aDocument, aPostData, aAllowThirdPartyFixup,
649  aReferrer)
650 {
651  if (aDocument)
652  urlSecurityCheck(aURL, aDocument.nodePrincipal);
653 
654  // if and only if the current window is a browser window and it has a
655  // document with a character set, then extract the current charset menu
656  // setting from the current document and use it to initialize the new browser
657  // window...
658  var charsetArg = null;
659  var wintype = document.documentElement.getAttribute("windowtype");
660  if (wintype == "navigator:browser")
661  charsetArg = "charset=" + window.content.document.characterSet;
662 
663  var referrerURI = aDocument ? aDocument.documentURIObject : aReferrer;
664  return window.openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no",
665  aURL, charsetArg, referrerURI, aPostData,
666  aAllowThirdPartyFixup);
667 }
668 
680 function isValidFeed(aLink, aPrincipal, aIsFeed)
681 {
682  if (!aLink || !aPrincipal)
683  return false;
684 
685  var type = aLink.type.toLowerCase().replace(/^\s+|\s*(?:;.*)?$/g, "");
686  if (!aIsFeed) {
687  aIsFeed = (type == "application/rss+xml" ||
688  type == "application/atom+xml");
689  }
690 
691  if (aIsFeed) {
692  try {
693  urlSecurityCheck(aLink.href, aPrincipal,
694  Components.interfaces.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL);
695  return type || "application/rss+xml";
696  }
697  catch(ex) {
698  }
699  }
700 
701  return null;
702 }
703 
704 // aCalledFromModal is optional
705 function openHelpLink(aHelpTopic, aCalledFromModal) {
706  var url = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
707  .getService(Components.interfaces.nsIURLFormatter)
708  .formatURLPref("app.support.baseURL");
709  url += aHelpTopic;
710 
711  var where = aCalledFromModal ? "window" : "tab";
712  openUILinkIn(url, where);
713 }
714 
715 function openPrefsHelp() {
716  var prefs = Components.classes["@mozilla.org/preferences-service;1"]
717  .getService(Components.interfaces.nsIPrefBranch2);
718 
719  // non-instant apply prefwindows are usually modal, so we can't open in the topmost window,
720  // since its probably behind the window.
721  var instantApply = prefs.getBoolPref("browser.preferences.instantApply");
722 
723  var helpTopic = document.getElementsByTagName("prefwindow")[0].currentPane.helpTopic;
724  openHelpLink(helpTopic, !instantApply);
725 }
var TAB_DROP_TYPE
let prefSvc
const Cc
function openNewTabWith(aURL, aDocument, aPostData, aEvent, aAllowThirdPartyFixup, aReferrer)
function isBidiEnabled()
function checkForUpdates()
function gatherTextUnder(root)
function openUILinkIn(url, where, allowThirdPartyFixup, postData, referrerUrl)
var pref
Definition: openLocation.js:44
function openPrefsHelp()
function getTopWin()
function openHelpLink(aHelpTopic, aCalledFromModal)
var event
function checkForMiddleClick(node, event)
function makeURLAbsolute(aBase, aUrl)
function getBoolPref(prefname, def)
sidebarFactory createInstance
Definition: nsSidebar.js:351
var gBidiUI
function closeMenus(node)
function buildHelpMenu()
function openTopWin(url)
getService(Ci.sbIFaceplateManager)
let window
function getBrowserFromContentWindow(aContentWindow)
var strings
Definition: Info.js:46
function openPreferences(paneID, extraArgs)
function openReleaseNotes()
_collectFormDataForFrame aDocument
function openAboutDialog()
function makeURI(aURLSpec, aCharset)
Definition: FeedWriter.js:71
function goToggleToolbar(id, elementID)
function isElementVisible(aElement)
function focusElement(aElement)
function openUILink(url, e, ignoreButton, ignoreAlt, allowKeywordFixup, postData, referrerUrl)
function getBrowserURL()
function isValidFeed(aLink, aPrincipal, aIsFeed)
var Window
return null
Definition: FeedWriter.js:1143
var safebrowsing
Definition: sb-loader.js:37
function openAdvancedPreferences(tabID)
function whereToOpenLink(e, ignoreButton, ignoreAlt)
let node
function url(spec)
var prefs
Definition: FeedWriter.js:1169
function openNewWindowWith(aURL, aDocument, aPostData, aAllowThirdPartyFixup, aReferrer)
function openTroubleshootingPage()
const Ci
function getShellService()
function msg
var browser
Definition: openLocation.js:42
jQuery fn
_getSelectedPageStyle s i
converter charset