Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriodiste authored Sep 24, 2023
1 parent e9b472f commit 860861d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ let hostname = window.location.hostname;
// console.log("Root folder path: " + root_folder);
// console.log("Hostname: " + hostname);

console.log("Version 1.2.0");
console.log("Version 1.3.0");

function get_url(resource, flag = false) {
let to_ret = "";
if (!flag) {
if (resource.startsWith("/")) resource = resource.substring(1);
if (resource.startsWith("./")) resource = resource.substring(2);
return root_folder + resource;
to_ret = root_folder + resource;
} else {
if (resource.startsWith("/")) resource = ".." + resource;
if (resource.startsWith("./")) resource = "." + resource;
return resource;
to_ret = resource;
}
console.log("Trying to load '" + resource + "' from: " + to_ret);
return to_ret;
}

// Make it so that, on any error, a <div> is added to the page with the error message, in the top-middle of the page
Expand Down

0 comments on commit 860861d

Please sign in to comment.