diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-05-25 20:45:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-25 20:45:48 +0000 |
commit | 72bab89cf6c77c9ee95a977c306e6ce317b84835 (patch) | |
tree | ca3fcaa2a72700b85221b2fe75bb7d46d5d424ce /browser/base/content/browser.js | |
parent | d5459982f0d1bab08b751dc140c4cbe047032617 (diff) | |
download | UXP-72bab89cf6c77c9ee95a977c306e6ce317b84835.tar UXP-72bab89cf6c77c9ee95a977c306e6ce317b84835.tar.gz UXP-72bab89cf6c77c9ee95a977c306e6ce317b84835.tar.lz UXP-72bab89cf6c77c9ee95a977c306e6ce317b84835.tar.xz UXP-72bab89cf6c77c9ee95a977c306e6ce317b84835.zip |
Revert "Remove the Social API"
Diffstat (limited to 'browser/base/content/browser.js')
-rwxr-xr-x | browser/base/content/browser.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 4b8ec864b..8679bca83 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -44,6 +44,7 @@ Cu.import("resource://gre/modules/NotificationDB.jsm"); ["ShortcutUtils", "resource://gre/modules/ShortcutUtils.jsm"], ["SimpleServiceDiscovery", "resource://gre/modules/SimpleServiceDiscovery.jsm"], ["SitePermissions", "resource:///modules/SitePermissions.jsm"], + ["Social", "resource:///modules/Social.jsm"], ["TabCrashHandler", "resource:///modules/ContentCrashHandlers.jsm"], ["Task", "resource://gre/modules/Task.jsm"], ["TelemetryStopwatch", "resource://gre/modules/TelemetryStopwatch.jsm"], @@ -1404,6 +1405,8 @@ var gBrowserInit = { // Enable the Restore Last Session command if needed RestoreLastSessionObserver.init(); + SocialUI.init(); + // Start monitoring slow add-ons AddonWatcher.init(); @@ -1534,6 +1537,7 @@ var gBrowserInit = { gPrefService.removeObserver(ctrlTab.prefName, ctrlTab); ctrlTab.uninit(); + SocialUI.uninit(); gBrowserThumbnails.uninit(); FullZoom.destroy(); @@ -4293,7 +4297,9 @@ var XULBrowserWindow = { // Called before links are navigated to to allow us to retarget them if needed. onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) { - return BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab); + let target = BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab); + SocialUI.closeSocialPanelForLinkTraversal(target, linkNode); + return target; }, // Check whether this URI should load in the current process @@ -4474,6 +4480,8 @@ var XULBrowserWindow = { gIdentityHandler.onLocationChange(); + SocialUI.updateState(); + UITour.onLocationChange(location); gTabletModePageCounter.inc(); |