diff --git a/previewers/betatest/js/ncml.js b/previewers/betatest/js/ncml.js index 993e72d..15ef09a 100644 --- a/previewers/betatest/js/ncml.js +++ b/previewers/betatest/js/ncml.js @@ -9,7 +9,12 @@ function translateBaseHtmlPage() { function writeContent(fileUrl, file, title, authors) { addStandardPreviewHeader(file, title, authors); - var ncmlUrl = queryParams.get("siteUrl") + "/api/access/datafile/" + queryParams.get("fileid") + "/auxiliary/NcML/0.1"; + var apiTokenOptional = ""; + var apiToken = queryParams.get("key"); + if (apiToken != null) { + apiTokenOptional = "?key=" + apiToken; + } + var ncmlUrl = queryParams.get("siteUrl") + "/api/access/datafile/" + queryParams.get("fileid") + "/auxiliary/NcML/0.1" + apiTokenOptional; // copied from text.js var whiteList = { a: ["title"],