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

Unified Diff: safari/ext/background.js

Issue 5466750908891136: Reset browser actions on Safari while the tab is loading (Closed)
Patch Set: Created Jan. 23, 2014, 10:10 a.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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: safari/ext/background.js
===================================================================
--- a/safari/ext/background.js
+++ b/safari/ext/background.js
@@ -273,6 +273,26 @@
}
});
+ ext.tabs.onLoading.addListener(function(tab)
+ {
+ var currentWindow = tab._tab.browserWindow;
+
+ var toolbarItem;
+ if (tab._tab == currentWindow.activeTab)
+ toolbarItem = getToolbarItemForWindow(currentWindow);
+ else
+ toolbarItem = null;
+
+ for (var name in toolbarItemProperties)
+ {
+ var property = toolbarItemProperties[name];
+ property.tabs.delete(tab);
+
+ if (toolbarItem)
+ toolbarItem[name] = property.global;
+ }
+ });
+
/* Windows */
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld