Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: safari/ext/popup.js

Issue 5220277533278208: Made the bubble use the ext object from the background page instead of including ext/background.js (Closed)
Patch Set: Don't use with statement Created Jan. 15, 2014, 4:53 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« chrome/ext/popup.js ('K') | « safari/ext/background.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 (function()
2 {
3 // Safari will load the popover once, and then show it everytime the icon is
4 // clicked. While Chrome loads it everytime you click the icon. So in order to
5 // force the same behavior in Safari, we are going to reload the page of the
6 // bubble everytime it is shown.
7 safari.application.addEventListener("popover", function()
8 {
9 document.documentElement.style.display = "none";
10 document.location.reload();
11 }, true);
12
13 // import ext into the javascript context of the popover. This code might fail ,
14 // when the background page isn't ready yet. So it is important to put it belo w
15 // the reloading code above.
16 var backgroundPage = safari.extension.globalPage.contentWindow;
17 ext = backgroundPage.ext;
18 TabMap = backgroundPage.TabMap;
19 })();
OLDNEW
« chrome/ext/popup.js ('K') | « safari/ext/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld