Created
April 28, 2020 12:21
-
-
Save louy2/19c8f7e777fb7b57404cfa1e85b8a236 to your computer and use it in GitHub Desktop.
Zotero script for fixing url of video of chaos computer club
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var items = Zotero.getActiveZoteroPane().getSelectedItems(); | |
for (let item of items) { | |
//return item | |
let d = item.getField("libraryCatalog").trim() | |
let p = item.getField("url").trim() | |
//return { d, p } | |
//return p.startsWith("https") | |
if (!p.startsWith("https")) { | |
let u = "https://" + d + p | |
//return u | |
item.setField("url", u) | |
item.save() | |
} | |
} | |
return items |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment