Skip to content

Commit

Permalink
set upload title for unpublished Zenodo records
Browse files Browse the repository at this point in the history
  • Loading branch information
aborel committed Nov 3, 2023
1 parent 37084ce commit d1b1b7e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion zenodo_greasemonkey.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
// R5, N4 better left out of automatic checking

// TODO R2 appears twice in the feedback message???
// TODO the title and link to the dataset is broken for records that are not published yet

const checkLevels = [{"short": "must", "full": "MUST (mandatory for acceptance into the collection)"}, {"short": "recommended", "full": "RECOMMENDED"}, {"short": "nth", "full": "NICE-TO-HAVE"}];

Expand Down Expand Up @@ -513,6 +512,13 @@ function addButtons() {

var zenodoURL = window.location.href;
let title = document.title.replace(' | Zenodo', '');
if (title == "Zenodo") {
possibleTitle = $("h2.request-header");
if (possibleTitle.length) {
title = possibleTitle.text();
identifier = "unpublished"
}
}
console.log(title);
console.log(zenodoURL);

Expand Down

0 comments on commit d1b1b7e

Please sign in to comment.