Skip to content

Commit

Permalink
Use hash.path from url
Browse files Browse the repository at this point in the history
  • Loading branch information
ModelEarth committed May 6, 2024
1 parent 9e3ce2f commit 480d90d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion view/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
document.addEventListener('hashChangeEvent', function (elem) {
let hash = getHash();
if (hash.feed != priorHash.feed) {
updateHash({'path':''});
displayFeed();
}
}, false);
Expand All @@ -161,7 +162,9 @@
function displayFeed() {
let hash = getHash();
if (!hash.feed || hash.feed == "none") {
hash.feed = "usda"
if (!hash.path) {
hash.feed = "usda"
}
}
$("#resultFull").css("opacity","0");
$("#resultLoading").show(); // .text("Loading...");
Expand All @@ -186,6 +189,9 @@
//var url = "https://kg.diffbot.com/kg/dql_endpoint?type=query&token=31c80e03058e4f5b86585fb9e97640a6&size=3&from=0&query=type%3AOrganization%20name%3A%22General%20Mills%22";

let url = "";
if (hash.path) {
url = hash.path;
}
selected_array = [];

// https://github.com/ModelEarth/data-commons/blob/main/docs/air/emissions/data/API_EN.ATM.CO2E.PC_DS2_zh_csv_v2_45186.csv
Expand Down

0 comments on commit 480d90d

Please sign in to comment.