Skip to content

Commit

Permalink
Hopefully fixes injection problems in firefox for certain pages.
Browse files Browse the repository at this point in the history
Addresses #191, but we should wait for Firefox to fix this as discussed
on the issue page, since this check if fairly inefficient
  • Loading branch information
adomasven committed Oct 4, 2017
1 parent 249bba2 commit b6aa745
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/browserExt/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ Zotero.Connector_Browser = new function() {
}, 5000);

var urlChanged = Zotero.Promise.defer();
function urlChangeListener(tabID, changeInfo) {
if (tabID != tab.id || (changeInfo && !changeInfo.url)) return;
function urlChangeListener(tabID, changeInfo, changeTab) {
if (tabID != tab.id || (changeInfo && changeTab.url == tab.url)) return;
urlChanged.reject(new Error(`Url changed mid-injection into ${tab.id}-${frameId}`))
}
browser.tabs.onRemoved.addListener(urlChangeListener);
Expand Down

0 comments on commit b6aa745

Please sign in to comment.