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

Unified 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: Created Dec. 21, 2013, 7:12 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« safari/ext/background.js ('K') | « safari/ext/background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: safari/ext/popup.js
===================================================================
new file mode 100644
--- /dev/null
+++ b/safari/ext/popup.js
@@ -0,0 +1,15 @@
+with (safari.extension.globalPage.contentWindow)
+{
+ this.ext = ext;
+ this.TabMap = TabMap;
+}
+
+// Safari will load the popover once, and then show it everytime the icon is
+// clicked. While Chrome loads it everytime you click the icon. So in order to
+// force the same behavior in Safari, we are going to reload the page of the
+// bubble everytime it is shown.
+safari.application.addEventListener("popover", function()
+{
+ document.documentElement.style.display = "none";
+ document.location.reload();
+}, true);
« safari/ext/background.js ('K') | « safari/ext/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld