You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a patch that will get Google Scholar working again. Apologies for submitting in this form: I need to shift my MLZ translator repo to a branch, but I've been putting off the work because it will impact the MLZ update chain, and I don't currently have time for the debugging.
Anyway, here is the patch.
Cheers,
Frank
--- Google Scholar.js 2012-07-21 20:48:38.525122854 +0900+++ /home/bennett/.mozilla/firefox/vdzbh5n4.3.0.8/zotero/translators/Google Scholar.js 2012-07-21 21:06:31.429131733 +0900@@ -46,7 +46,7 @@
url.indexOf('about=') == -1) {
return "case";
} else if( ZU.xpath(doc,
- '//div[@class="gs_r"]/div[@class="gs_fl"]/a[contains(@href,"q=related:")]')+ '//div[@class="gs_r"]//div[@class="gs_fl"]/a[contains(@href,"q=related:")]')
.length ) {
return "multiple";
}
@@ -236,7 +236,7 @@
//attach files linked on the right
var pdf = ZU.xpath(article.result,
- './div[contains(@class,"gs_fl")]\+ './/div[contains(@class,"gs_fl")]\
/a[./node()[starts-with(text(),"[")]]');
for(var i=0, n=pdf.length; i<n; i++) {
var attach = getAttachment(pdf[i].href,
@@ -449,18 +449,18 @@
*/
var results = ZU.xpath(doc,
'//div[@class="gs_r"]\
- [./div[@class="gs_fl"]/a[contains(@href,"q=info:") or contains(@href,"q=related:")]]');+ [.//div[@class="gs_fl"]/a[contains(@href,"q=info:") or contains(@href,"q=related:")]]');
var items = new Object();
var resultDivs = new Object();
var bibtexUrl;
for(var i=0, n=results.length; i<n; i++) {
bibtexUrl = ZU.xpathText(results[i],
- './div[@class="gs_fl"]/a[contains(@href,"q=info:") or contains(@href,"q=related:")][1]/@href')+ './/div[@class="gs_fl"]/a[contains(@href,"q=info:") or contains(@href,"q=related:")][1]/@href')
.replace(/\/scholar.*?\?/,'/scholar.bib?')
.replace(/=related:/,'=info:')
+ '&ct=citation&cd=1&output=citation';
- items[bibtexUrl] = ZU.xpathText(results[i], './h3[@class="gs_rt"]');+ items[bibtexUrl] = ZU.xpathText(results[i], './/h3[@class="gs_rt"]');
//keep the result div for extra information
resultDivs[bibtexUrl] = results[i];
The text was updated successfully, but these errors were encountered:
This is a patch that will get Google Scholar working again. Apologies for submitting in this form: I need to shift my MLZ translator repo to a branch, but I've been putting off the work because it will impact the MLZ update chain, and I don't currently have time for the debugging.
Anyway, here is the patch.
Cheers,
Frank
The text was updated successfully, but these errors were encountered: