Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upRe-added support for old-style AustLII pages #1571
Conversation
jpwarren
and others
added some commits
Jan 20, 2018
zuphilip
reviewed
Mar 3, 2018
@@ -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.
This comment has been minimized.
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.
This comment has been minimized.
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.
This comment has been minimized.
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?
This comment has been minimized.
This comment has been minimized.
@jpwarren I fixed the merge conflict and have a question/request. Otherwise this looks fine. |
This comment has been minimized.
This comment has been minimized.
@zuphilip any reason not to merge this while we're figuring out the title/caseName issue? |
This comment has been minimized.
This comment has been minimized.
No, go ahead.
|
adam3smith
merged commit bb65dbc
into
zotero:master
Mar 4, 2018
1 check passed
This comment has been minimized.
This comment has been minimized.
Great, thanks! |
jpwarren commentedMar 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.