Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-added support for old-style AustLII pages #1571

Merged
merged 9 commits into from Mar 4, 2018

Conversation

Projects
None yet
3 participants
@jpwarren
Copy link
Contributor

jpwarren commented Mar 3, 2018

Some sites (like lawcite) link to the old-style AustLII pages, so we need to continue to support that format as well as the new shiny ribbon styles pages.

Otherwise you have to manually change the URL to use the new shiny ribbon styling for Zotero to correctly detect and process the page/citation.

@@ -113,6 +116,8 @@ function scrape(doc, url) {
var voliss = text(doc, 'head>title');
// e.g. C & M [2006] FamCA 212 (20 January 2006)
newItem.caseName = voliss.replace(/\s?\[.*$/, '');
newItem.title = newItem.caseName;

This comment has been minimized.

@zuphilip

zuphilip Mar 3, 2018

Collaborator

Why did you change that? For a case the title is actually the caseName, thus the title here will be deleted before saving into the database. Please change back these two lines.

This comment has been minimized.

@jpwarren

jpwarren Mar 3, 2018

Author Contributor

Because without a .title, the Zotero connector in Chrome fails with an error, and the new item doesn't get created in Zotero.

I agree it shouldn't be necessary, but right now it is.

This comment has been minimized.

@zuphilip

zuphilip Mar 3, 2018

Collaborator

Uff, yes indeed. There is currently an error for cases also with Firefox, e.g. http://www8.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/AICmr/2017/134.html @dstillman Is it intended that a missing title but present caseName leads to an error?

@zuphilip

This comment has been minimized.

Copy link
Collaborator

zuphilip commented Mar 3, 2018

@jpwarren I fixed the merge conflict and have a question/request. Otherwise this looks fine.

@adam3smith

This comment has been minimized.

Copy link
Collaborator

adam3smith commented Mar 4, 2018

@zuphilip any reason not to merge this while we're figuring out the title/caseName issue?

@zuphilip

This comment has been minimized.

Copy link
Collaborator

zuphilip commented Mar 4, 2018

@adam3smith adam3smith merged commit bb65dbc into zotero:master Mar 4, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@adam3smith

This comment has been minimized.

Copy link
Collaborator

adam3smith commented Mar 4, 2018

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.