My custom translators are ignored by Chrome extension
HI, I want to edit my web translators to customize the behavior.
But my changes are ignored, and I need your help.
For instance, I need to extract the abstract from this page:
http://jmlr.org/proceedings/papers/v37/zhaoa15.html
I'm a user of
- MacOSX (Yosemite)
- Zotero standalone (ver 4.0.27)
- Zotero connector for Chrome (ver 4.0.26)
- Zotfile (4.1.5.1)
In my environment, the translator that handles this URL seems to be located in
$ZOTERO_DATA/translators/Journal of Machine Learning Research.js
where $ZOTERO_DATA is my custom data location specified in
Preferences > Advanced > Data Directory Location > Custom .
As the first step, to verify if my changes are indeed reflected to the Chrome connector,
I edited like this (line 34 in the file).
//item.title = titlecontent.replace(/\s+$/, '');
item.title = 'aaaaaa' + titlecontent.replace(/\s+$/, '');
Then I restarted both Chrome and Zotero standalone.
I move to the URL, hit the button on the address bar,
and check the new entry on Zotero standalone, but nothing changed before the editing.
I doubt Zotero uses some form of cache rather than the real translator files,
and I found $ZOTERO_DATA/zotero.sqlite has a table 'translatorCache',
but it doesn't contain any code fragment.
I searched this forum and Google, but I couldn't find a solution.
Ideally, maybe I have to be a contributor of Zotero development and send pull-request,
but I prefer testing locally till I get confident about my changes,
and I can't wait till my changes are accepted by the community.
Any help would be appreciated. Thanks.
But my changes are ignored, and I need your help.
For instance, I need to extract the abstract from this page:
http://jmlr.org/proceedings/papers/v37/zhaoa15.html
I'm a user of
- MacOSX (Yosemite)
- Zotero standalone (ver 4.0.27)
- Zotero connector for Chrome (ver 4.0.26)
- Zotfile (4.1.5.1)
In my environment, the translator that handles this URL seems to be located in
$ZOTERO_DATA/translators/Journal of Machine Learning Research.js
where $ZOTERO_DATA is my custom data location specified in
Preferences > Advanced > Data Directory Location > Custom .
As the first step, to verify if my changes are indeed reflected to the Chrome connector,
I edited like this (line 34 in the file).
//item.title = titlecontent.replace(/\s+$/, '');
item.title = 'aaaaaa' + titlecontent.replace(/\s+$/, '');
Then I restarted both Chrome and Zotero standalone.
I move to the URL, hit the button on the address bar,
and check the new entry on Zotero standalone, but nothing changed before the editing.
I doubt Zotero uses some form of cache rather than the real translator files,
and I found $ZOTERO_DATA/zotero.sqlite has a table 'translatorCache',
but it doesn't contain any code fragment.
I searched this forum and Google, but I couldn't find a solution.
Ideally, maybe I have to be a contributor of Zotero development and send pull-request,
but I prefer testing locally till I get confident about my changes,
and I can't wait till my changes are accepted by the community.
Any help would be appreciated. Thanks.
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
I'll try to make the translator detect the page.
Thank you very much for your help.