This commit is contained in:
Alex
2023-02-07 22:05:57 +00:00
parent 82fad506ce
commit 8ac143105b
2 changed files with 12 additions and 14 deletions

View File

@@ -1,17 +1,3 @@
function docsIndex() {
// loads latest index from https://raw.githubusercontent.com/arc53/DocsHUB/main/combined.json
// and stores it in localStorage
fetch('https://raw.githubusercontent.com/arc53/DocsHUB/main/combined.json')
.then(response => response.json())
.then(data => {
console.log('Success:', data);
localStorage.setItem("docsIndex", JSON.stringify(data));
}
)
}
document.getElementById("select-docs").addEventListener("change", function() {
localStorage.setItem('activeDocs', this.value)
fetch('/api/docs_check', {

View File

@@ -96,6 +96,18 @@ This will return a new DataFrame with all the columns from both tables, and only
</div>
</div>
<script>
function docsIndex() {
// loads latest index from https://raw.githubusercontent.com/arc53/DocsHUB/main/combined.json
// and stores it in localStorage
fetch('https://raw.githubusercontent.com/arc53/DocsHUB/main/combined.json')
.then(response => response.json())
.then(data => {
console.log('Success:', data);
localStorage.setItem("docsIndex", JSON.stringify(data));
}
)
}
// check if api_key is set
if (localStorage.getItem('apiKey') === null) {
console.log("apiKey is not set")