diff options
| author | Stephen Blott | 2015-04-03 10:13:56 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-04-03 10:13:56 +0100 |
| commit | 58512fd855e41d80cdcd75b1261ee967c78391e4 (patch) | |
| tree | ec66666c6115b82fbb7bfebffa41c1c29e8774a5 /content_scripts | |
| parent | bfa8eb3ee2985064895e3bb7b92f135399c403af (diff) | |
| parent | 96785e861791be89cd4cf98b90c76efa60eaf803 (diff) | |
| download | vimium-58512fd855e41d80cdcd75b1261ee967c78391e4.tar.bz2 | |
Merge branch 'upgrade-notification'
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 2c157978..dec34774 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -165,8 +165,6 @@ initializePreDomReady = -> window.removeEventListener "focus", onFocus requestHandlers = - hideUpgradeNotification: -> HUD.hideUpgradeNotification() - showUpgradeNotification: (request) -> HUD.showUpgradeNotification(request.version) showHUDforDuration: (request) -> HUD.showForDuration request.text, request.duration toggleHelpDialog: (request) -> toggleHelpDialog(request.dialogHtml, request.frameId) focusFrame: (request) -> if (frameId == request.frameId) then focusThisFrame(request.highlight) @@ -1070,7 +1068,6 @@ toggleHelpDialog = (html, fid) -> HUD = _tweenId: -1 _displayElement: null - _upgradeNotificationElement: null # This HUD is styled to precisely mimick the chrome HUD on Mac. Use the "has_popup_and_link_hud.html" # test harness to tweak these styles to match Chrome's. One limitation of our HUD display is that @@ -1088,26 +1085,6 @@ HUD = HUD._tweenId = Tween.fade(HUD.displayElement(), 1.0, 150) HUD.displayElement().style.display = "" - showUpgradeNotification: (version) -> - HUD.upgradeNotificationElement().innerHTML = "Vimium has been upgraded to #{version}. See - <a class='vimiumReset' target='_blank' - href='https://github.com/philc/vimium#release-notes'> - what's new</a>.<a class='vimiumReset close-button' href='#'>×</a>" - links = HUD.upgradeNotificationElement().getElementsByTagName("a") - links[0].addEventListener("click", HUD.onUpdateLinkClicked, false) - links[1].addEventListener "click", (event) -> - event.preventDefault() - HUD.onUpdateLinkClicked() - Tween.fade(HUD.upgradeNotificationElement(), 1.0, 150) - - onUpdateLinkClicked: (event) -> - HUD.hideUpgradeNotification() - chrome.runtime.sendMessage({ handler: "upgradeNotificationClosed" }) - - hideUpgradeNotification: (clickEvent) -> - Tween.fade(HUD.upgradeNotificationElement(), 0, 150, - -> HUD.upgradeNotificationElement().style.display = "none") - # # Retrieves the HUD HTML element. # @@ -1118,13 +1095,6 @@ HUD = HUD._displayElement.style.right = "150px" HUD._displayElement - upgradeNotificationElement: -> - if (!HUD._upgradeNotificationElement) - HUD._upgradeNotificationElement = HUD.createHudElement() - # Position this just to the left of our normal HUD. - HUD._upgradeNotificationElement.style.right = "315px" - HUD._upgradeNotificationElement - createHudElement: -> element = document.createElement("div") element.className = "vimiumReset vimiumHUD" |
