diff --git a/index.html b/index.html index 25c3126..174a145 100644 --- a/index.html +++ b/index.html @@ -29,11 +29,12 @@ @@ -46,7 +47,7 @@ }) // get the version from url - let version = 'v3.1'; + let version = 'v4'; if (window.location.search && window.location.search.length > 1) { const versionParams = window.location.search.slice(1).split("&").filter(function (item) { return item.startsWith("version=") @@ -60,23 +61,27 @@ } const sopFileName = { + 'v4': 'OncoKB_Curation_Standard_Operating_Procedure_v4.pdf', 'v3.1': 'OncoKB_Curation_Standard_Operating_Procedure_v3_1.pdf', 'v3': 'OncoKB_Curation_Standard_Operating_Procedure_v3.pdf', - 'v3.0': 'OncoKB_Curation_Standard_Operating_Procedure_v3.pdf', 'v2.2': 'OncoKB_Curation_Standard_Operating_Procedure_v2_2.pdf', 'v2.1': 'OncoKB_Curation_Standard_Operating_Procedure_v2_1.pdf', 'v2': 'OncoKB_Curation_Standard_Operating_Procedure_v2.pdf', - 'v2.0': 'OncoKB_Curation_Standard_Operating_Procedure_v2.pdf', 'v1.1': 'OncoKB_Curation_Standard_Operating_Protocol_v1_1.pdf', }; // show PDF document.addEventListener("adobe_dc_view_sdk.ready", function () { $('#current-version-span').text('Version ' + version.slice(1)); + + let fileNameKey = version; + if (version.endsWith('.0')) { + fileNameKey = version.substring(0, version.lastIndexOf('.0')); + } const adobeDCView = new AdobeDC.View({clientId: "021af7308f8f45e486c2e021a38de8d8", divId: "adobe-dc-view"}); adobeDCView.previewFile({ - content: {location: {url: sopFileName[version]}}, - metaData: {fileName: sopFileName[version]} + content: {location: {url: sopFileName[fileNameKey]}}, + metaData: {fileName: sopFileName[fileNameKey]} }, {defaultViewMode: "FIT_PAGE", dockPageControls: false}); }); diff --git a/sop/OncoKB_Curation_Standard_Operating_Procedure_v4.pdf b/sop/OncoKB_Curation_Standard_Operating_Procedure_v4.pdf new file mode 100644 index 0000000..533dafb Binary files /dev/null and b/sop/OncoKB_Curation_Standard_Operating_Procedure_v4.pdf differ