Find DOI anywhere in string in Add Item by Identifier
This commit is contained in:
parent
031f5548b5
commit
b2589585db
1 changed files with 4 additions and 3 deletions
|
@ -3,9 +3,10 @@ const Zotero_Lookup = new function () {
|
||||||
document.getElementById("progress").setAttribute("status", "animate");
|
document.getElementById("progress").setAttribute("status", "animate");
|
||||||
document.getElementById("accept-button").disabled = true;
|
document.getElementById("accept-button").disabled = true;
|
||||||
var identifier = document.getElementById("lookup-textbox").value;
|
var identifier = document.getElementById("lookup-textbox").value;
|
||||||
if(identifier.substr(0, 3) == "10.") {
|
|
||||||
// DOI
|
var doi = Zotero.Utilities.prototype.cleanDOI(identifier);
|
||||||
var item = {itemType:"journalArticle", DOI:identifier};
|
if(doi) {
|
||||||
|
var item = {itemType:"journalArticle", DOI:doi};
|
||||||
} else {
|
} else {
|
||||||
identifier = identifier.replace("-", "", "g");
|
identifier = identifier.replace("-", "", "g");
|
||||||
if(identifier.length == 10 || identifier.length == 13) {
|
if(identifier.length == 10 || identifier.length == 13) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue