From c6a2af7ab5d20f1ecda513f2031d671c2cdbeac4 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 21 Sep 2018 19:48:54 -0400 Subject: [PATCH] Use 'load' instead of 'pageshow' in Zotero.HTTP.loadDocuments() This seems to fix snapshots in Twitter, which need to wait for a JS-based self-redirect [1]. [1] https://blog.twitter.com/engineering/en_us/topics/insights/2018/twitter_silhouette.html --- chrome/content/zotero/xpcom/http.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js index f011bbc3f4..708bc2ac00 100644 --- a/chrome/content/zotero/xpcom/http.js +++ b/chrome/content/zotero/xpcom/http.js @@ -914,7 +914,7 @@ Zotero.HTTP = new function() { } Zotero.debug("Zotero.HTTP.loadDocuments: " + url + " loaded"); - hiddenBrowser.removeEventListener("pageshow", onLoad, true); + hiddenBrowser.removeEventListener("load", onLoad, true); hiddenBrowser.zotero_loaded = true; var maybePromise; @@ -962,7 +962,7 @@ Zotero.HTTP = new function() { for(var i=0; i