if(urlParams.has("doi")){
doi="https://"+urlParams.get("doi")+"/";
}
-if(localStorage.getItem("bibliographies")){
+if(localStorage.getItem("bibliographies")!=null){
bibgraph=JSON.parse(localStorage.getItem("bibliographies"));
}
function write(){
});
}
$(document).ready(function(){
+ showAllBibs();
$(".step-selector").on("click", ".to-select", function(e){
e.preventDefault();
$(this).children("input").prop("checked", !$(this).children("input").prop("checked"));
file="";
}
$.getJSON(urlParams.get("src")+"?callback=?"+file, function(data){
- bibgraph[data.config.id]=data;
+ if(typeof bibgraph[data.config.id]=="undefined"){
+ bibgraph[data.config.id]=data;
+ }
+ else{
+ if(confirm("Data with same ID already exists. Overwrite?")){
+ bibgraph[data.config.id]=data;
+ }
+ }
write();
showAllBibs();
});