Commit 5d4b5b86 authored by Maxime Chaillet's avatar Maxime Chaillet

fix finding doi using dev.html page

parent 8221e08a
......@@ -29,16 +29,13 @@
<script src="min/precompiled.templates.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var params = new URLSearchParams(document.location.search.substring(1));
var doi;
if (params.get("DOI")){
doi = params.get("DOI");
$(document).ready(function() {
var doi = document.location.search.substring(5);
if (doi==="") {
alert ("Please use dev.html page as follow .../dev.html?DOI=prefix/suffix");
} else {
new DOIController(new DOIView()).getData(doi);
}
else{
doi = document.location.pathname.substring(1,document.location.pathname.length )
}
new DOIController(new DOIView()).getData(doi);
});
......
......@@ -22,16 +22,13 @@
<!-- include: "type": "js", "files": "min/precompiled.templates.min.js" -->
<script type="text/javascript">
$(document).ready(function() {
var params = new URLSearchParams(document.location.search.substring(1));
var doi;
if (params.get("DOI")){
doi = params.get("DOI");
$(document).ready(function() {
var doi = document.location.search.substring(5);
if (doi==="") {
alert ("Please use dev.html page as follow .../dev.html?DOI=prefix/suffix");
} else {
new DOIController(new DOIView()).getData(doi);
}
else{
doi = document.location.pathname.substring(1,document.location.pathname.length )
}
new DOIController(new DOIView()).getData(doi);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment