www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 7fb3c13bc2ce7e823531824599dd98e586c233f9
parent a7984916ad2fceab5ffd39feba5d2fe44ab70381
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date:   Mon, 27 May 2013 18:43:42 -0500

Prefer higher priority translators even if they don't target the top frame.
E.g. pdf+html pages for HighWire 2.0 (http://www.plantcell.org/content/25/4/1213.full.pdf+html?with-ds=yes)

Diffstat:
Mchrome/content/zotero/browser.js | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js @@ -812,11 +812,14 @@ Zotero_Browser.Tab.prototype._translatorsAvailable = function(translate, transla //this set of translators is not targeting the same URL as a previous set of translators, // because otherwise we want to use the newer set && this.page.document.location.href != translate.document.location.href - //the previous set of translators targets the top frame or the current one does not either - && (this.page.document.defaultView == this.page.document.defaultView.top - || translate.document.defaultView !== this.page.document.defaultView.top) - //the best translator we had was of higher priority than the new set - && this.page.translators[0].priority <= translators[0].priority + //the best translator we had was of higher priority than the new set + && (this.page.translators[0].priority < translators[0].priority + //or the priority was the same, but... + || (this.page.translators[0].priority == translators[0].priority + //the previous set of translators targets the top frame or the current one does not either + && (this.page.document.defaultView == this.page.document.defaultView.top + || translate.document.defaultView !== this.page.document.defaultView.top) + )) ) { return; //keep what we had } else {