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: Rebased and moved imports to the bottom Created Jan. 15, 2014, 4:38 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
« no previous file with comments | « 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 // Safari will load the popover once, and then show it everytime the icon is
2 // clicked. While Chrome loads it everytime you click the icon. So in order to
3 // force the same behavior in Safari, we are going to reload the page of the
4 // bubble everytime it is shown.
5 safari.application.addEventListener("popover", function()
6 {
7 document.documentElement.style.display = "none";
8 document.location.reload();
9 }, true);
10
11 // import ext into the javascript context of the popover. This code might fail,
12 // when the background page isn't ready yet. So it is important to put it below
13 // the reloading code above.
14 with (safari.extension.globalPage.contentWindow)
15 {
16 this.ext = ext;
17 this.TabMap = TabMap;
18 }
OLDNEW
« no previous file with comments | « safari/ext/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld