Skip to content

Instantly share code, notes, and snippets.

@louy2
Created April 28, 2020 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save louy2/19c8f7e777fb7b57404cfa1e85b8a236 to your computer and use it in GitHub Desktop.
Save louy2/19c8f7e777fb7b57404cfa1e85b8a236 to your computer and use it in GitHub Desktop.
Zotero script for fixing url of video of chaos computer club
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