diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-06-02 01:34:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-02 01:34:01 +0200 |
commit | 571b7cdbed4dfbccef83e9208422e58eea504b6f (patch) | |
tree | 888393feffb61f88cac6c2cfbe58faac8da7a879 /browser/base | |
parent | d308bde8a31ae3e3a16b531af9a74de78deae53c (diff) | |
parent | d38e7b77846e346130acae2fe842dc91b1749556 (diff) | |
download | UXP-571b7cdbed4dfbccef83e9208422e58eea504b6f.tar UXP-571b7cdbed4dfbccef83e9208422e58eea504b6f.tar.gz UXP-571b7cdbed4dfbccef83e9208422e58eea504b6f.tar.lz UXP-571b7cdbed4dfbccef83e9208422e58eea504b6f.tar.xz UXP-571b7cdbed4dfbccef83e9208422e58eea504b6f.zip |
Merge pull request #424 from Ascrod/UITour
Remove UITour
Diffstat (limited to 'browser/base')
-rw-r--r-- | browser/base/content/baseMenuOverlay.xul | 4 | ||||
-rw-r--r-- | browser/base/content/browser-trackingprotection.js | 62 | ||||
-rw-r--r-- | browser/base/content/browser.css | 65 | ||||
-rwxr-xr-x | browser/base/content/browser.js | 8 | ||||
-rw-r--r-- | browser/base/content/browser.xul | 36 | ||||
-rw-r--r-- | browser/base/content/tab-content.js | 5 | ||||
-rw-r--r-- | browser/base/content/utilityOverlay.js | 7 |
7 files changed, 0 insertions, 187 deletions
diff --git a/browser/base/content/baseMenuOverlay.xul b/browser/base/content/baseMenuOverlay.xul index da74ca077..546103de1 100644 --- a/browser/base/content/baseMenuOverlay.xul +++ b/browser/base/content/baseMenuOverlay.xul @@ -52,10 +52,6 @@ #else /> #endif - <menuitem id="menu_openTour" - oncommand="openTourPage();" - label="&helpShowTour2.label;" - accesskey="&helpShowTour2.accesskey;"/> <menuitem id="menu_keyboardShortcuts" oncommand="openHelpLink('keyboard-shortcuts')" onclick="checkForMiddleClick(this, event);" diff --git a/browser/base/content/browser-trackingprotection.js b/browser/base/content/browser-trackingprotection.js index cacb0522c..20917a083 100644 --- a/browser/base/content/browser-trackingprotection.js +++ b/browser/base/content/browser-trackingprotection.js @@ -4,7 +4,6 @@ var TrackingProtection = { // If the user ignores the doorhanger, we stop showing it after some time. - MAX_INTROS: 20, PREF_ENABLED_GLOBALLY: "privacy.trackingprotection.enabled", PREF_ENABLED_IN_PRIVATE_WINDOWS: "privacy.trackingprotection.pbmode.enabled", enabledGlobally: false, @@ -106,16 +105,6 @@ var TrackingProtection = { this.icon.setAttribute("state", "blocked-tracking-content"); this.content.setAttribute("state", "blocked-tracking-content"); - // Open the tracking protection introduction panel, if applicable. - if (this.enabledGlobally) { - let introCount = gPrefService.getIntPref("privacy.trackingprotection.introCount"); - if (introCount < TrackingProtection.MAX_INTROS) { - gPrefService.setIntPref("privacy.trackingprotection.introCount", ++introCount); - gPrefService.savePrefFile(null); - this.showIntroPanel(); - } - } - this.shieldHistogramAdd(2); } else if (isAllowing) { this.icon.setAttribute("tooltiptext", this.disabledTooltipText); @@ -185,55 +174,4 @@ var TrackingProtection = { BrowserReload(); }, - - dontShowIntroPanelAgain() { - // This function may be called in private windows, but it does not change - // any preference unless Tracking Protection is enabled globally. - if (this.enabledGlobally) { - gPrefService.setIntPref("privacy.trackingprotection.introCount", - this.MAX_INTROS); - gPrefService.savePrefFile(null); - } - }, - - showIntroPanel: Task.async(function*() { - let brandBundle = document.getElementById("bundle_brand"); - let brandShortName = brandBundle.getString("brandShortName"); - - let openStep2 = () => { - // When the user proceeds in the tour, adjust the counter to indicate that - // the user doesn't need to see the intro anymore. - this.dontShowIntroPanelAgain(); - - let nextURL = Services.urlFormatter.formatURLPref("privacy.trackingprotection.introURL") + - "?step=2&newtab=true"; - switchToTabHavingURI(nextURL, true, { - // Ignore the fragment in case the intro is shown on the tour page - // (e.g. if the user manually visited the tour or clicked the link from - // about:privatebrowsing) so we can avoid a reload. - ignoreFragment: "whenComparingAndReplace", - }); - }; - - let buttons = [ - { - label: gNavigatorBundle.getString("trackingProtection.intro.step1of3"), - style: "text", - }, - { - callback: openStep2, - label: gNavigatorBundle.getString("trackingProtection.intro.nextButton.label"), - style: "primary", - }, - ]; - - let panelTarget = yield UITour.getTarget(window, "trackingProtection"); - UITour.initForBrowser(gBrowser.selectedBrowser, window); - UITour.showInfo(window, panelTarget, - gNavigatorBundle.getString("trackingProtection.intro.title"), - gNavigatorBundle.getFormattedString("trackingProtection.intro.description2", - [brandShortName]), - undefined, buttons, - { closeButtonCallback: () => this.dontShowIntroPanelAgain() }); - }), }; diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index ac5bf9e9b..e951985dc 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -1152,71 +1152,6 @@ toolbarpaletteitem[place="palette"][hidden] { display: none; } -/* UI Tour */ - -@keyframes uitour-wobble { - from { - transform: rotate(0deg) translateX(3px) rotate(0deg); - } - 50% { - transform: rotate(360deg) translateX(3px) rotate(-360deg); - } - to { - transform: rotate(720deg) translateX(0px) rotate(-720deg); - } -} - -@keyframes uitour-zoom { - from { - transform: scale(0.8); - } - 50% { - transform: scale(1.0); - } - to { - transform: scale(0.8); - } -} - -@keyframes uitour-color { - from { - border-color: #5B9CD9; - } - 50% { - border-color: #FF0000; - } - to { - border-color: #5B9CD9; - } -} - -#UITourHighlightContainer, -#UITourHighlight { - pointer-events: none; -} - -#UITourHighlight[active] { - animation-delay: 2s; - animation-fill-mode: forwards; - animation-iteration-count: infinite; - animation-timing-function: linear; -} - -#UITourHighlight[active="wobble"] { - animation-name: uitour-wobble; - animation-delay: 0s; - animation-duration: 1.5s; - animation-iteration-count: 1; -} -#UITourHighlight[active="zoom"] { - animation-name: uitour-zoom; - animation-duration: 1s; -} -#UITourHighlight[active="color"] { - animation-name: uitour-color; - animation-duration: 2s; -} - /* Combined context-menu items */ #context-navigation > .menuitem-iconic > .menu-iconic-text, #context-navigation > .menuitem-iconic > .menu-accel-container { diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 4b8ec864b..64c0d86f5 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -48,7 +48,6 @@ Cu.import("resource://gre/modules/NotificationDB.jsm"); ["Task", "resource://gre/modules/Task.jsm"], ["TelemetryStopwatch", "resource://gre/modules/TelemetryStopwatch.jsm"], ["Translation", "resource:///modules/translation/Translation.jsm"], - ["UITour", "resource:///modules/UITour.jsm"], ["UpdateUtils", "resource://gre/modules/UpdateUtils.jsm"], ["Weave", "resource://services-sync/main.js"], ["fxAccounts", "resource://gre/modules/FxAccounts.jsm"], @@ -984,7 +983,6 @@ var gBrowserInit = { let mm = window.getGroupMessageManager("browsers"); mm.loadFrameScript("chrome://browser/content/tab-content.js", true); mm.loadFrameScript("chrome://browser/content/content.js", true); - mm.loadFrameScript("chrome://browser/content/content-UITour.js", true); mm.loadFrameScript("chrome://global/content/manifestMessages.js", true); // initialize observers and listeners @@ -4474,7 +4472,6 @@ var XULBrowserWindow = { gIdentityHandler.onLocationChange(); - UITour.onLocationChange(location); gTabletModePageCounter.inc(); @@ -8085,11 +8082,6 @@ var AboutPrivateBrowsingListener = { const PREF = "privacy.trackingprotection.pbmode.enabled"; Services.prefs.setBoolPref(PREF, !Services.prefs.getBoolPref(PREF)); }); - window.messageManager.addMessageListener( - "AboutPrivateBrowsing:DontShowIntroPanelAgain", - msg => { - TrackingProtection.dontShowIntroPanelAgain(); - }); } }; diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 4f1b48349..028df609f 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -232,42 +232,6 @@ </hbox> </panel> - <!-- UI tour experience --> - <panel id="UITourTooltip" - type="arrow" - hidden="true" - noautofocus="true" - noautohide="true" - align="start" - orient="vertical" - role="alert"> - <vbox> - <hbox id="UITourTooltipBody"> - <image id="UITourTooltipIcon"/> - <vbox flex="1"> - <hbox id="UITourTooltipTitleContainer"> - <label id="UITourTooltipTitle" flex="1"/> - <toolbarbutton id="UITourTooltipClose" class="close-icon" - tooltiptext="&uiTour.infoPanel.close;"/> - </hbox> - <description id="UITourTooltipDescription" flex="1"/> - </vbox> - </hbox> - <hbox id="UITourTooltipButtons" flex="1" align="center"/> - </vbox> - </panel> - <!-- type="default" forces frames to be created so that the panel's size can be determined --> - <panel id="UITourHighlightContainer" - type="default" - hidden="true" - noautofocus="true" - noautohide="true" - flip="none" - consumeoutsideclicks="false" - mousethrough="always"> - <box id="UITourHighlight"></box> - </panel> - <menupopup id="toolbar-context-menu" onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator'));"> <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)" diff --git a/browser/base/content/tab-content.js b/browser/base/content/tab-content.js index a57dc6607..11a9fabce 100644 --- a/browser/base/content/tab-content.js +++ b/browser/base/content/tab-content.js @@ -226,8 +226,6 @@ var AboutPrivateBrowsingListener = { false, true); chromeGlobal.addEventListener("AboutPrivateBrowsingToggleTrackingProtection", this, false, true); - chromeGlobal.addEventListener("AboutPrivateBrowsingDontShowIntroPanelAgain", this, - false, true); }, get isAboutPrivateBrowsing() { @@ -245,9 +243,6 @@ var AboutPrivateBrowsingListener = { case "AboutPrivateBrowsingToggleTrackingProtection": sendAsyncMessage("AboutPrivateBrowsing:ToggleTrackingProtection"); break; - case "AboutPrivateBrowsingDontShowIntroPanelAgain": - sendAsyncMessage("AboutPrivateBrowsing:DontShowIntroPanelAgain"); - break; } }, }; diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js index 4ea6d8f90..38ca82f55 100644 --- a/browser/base/content/utilityOverlay.js +++ b/browser/base/content/utilityOverlay.js @@ -809,13 +809,6 @@ function openFeedbackPage() openUILinkIn(url, "tab"); } -function openTourPage() -{ - let scope = {} - Components.utils.import("resource:///modules/UITour.jsm", scope); - openUILinkIn(scope.UITour.url, "tab"); -} - function buildHelpMenu() { // Enable/disable the "Report Web Forgery" menu item. |