1.1
Browse files- advanced_demo.js +0 -33
advanced_demo.js
CHANGED
|
@@ -108,39 +108,6 @@ fetch(
|
|
| 108 |
});
|
| 109 |
|
| 110 |
|
| 111 |
-
fetch("https://dav7.pages.dev/api/serve.json")
|
| 112 |
-
.then((response) => response.json())
|
| 113 |
-
.then((data) => {
|
| 114 |
-
const sites = data.sites;
|
| 115 |
-
const mySelects = document.getElementById("mySelects");
|
| 116 |
-
|
| 117 |
-
sites.forEach((sites) => {
|
| 118 |
-
const preElement = document.createElement("option");
|
| 119 |
-
preElement.value = `${sites.properties.links}`;
|
| 120 |
-
preElement.textContent = `${sites.properties.title}`;
|
| 121 |
-
mySelects.appendChild(preElement);
|
| 122 |
-
});
|
| 123 |
-
})
|
| 124 |
-
.catch((error) => {
|
| 125 |
-
console.log("ERROR", error);
|
| 126 |
-
});
|
| 127 |
-
|
| 128 |
-
const select = document.getElementById("mySelects");
|
| 129 |
-
select.addEventListener("change", function () {
|
| 130 |
-
const url = this.value;
|
| 131 |
-
if (url) {
|
| 132 |
-
window.location = url;
|
| 133 |
-
}
|
| 134 |
-
});
|
| 135 |
-
|
| 136 |
-
/*shared*/
|
| 137 |
-
function sharesbutton() {
|
| 138 |
-
navigator.share({
|
| 139 |
-
title: document.title,
|
| 140 |
-
text: "COMPARTILHAR " + document.title + " \n",
|
| 141 |
-
url: window.location.href
|
| 142 |
-
});
|
| 143 |
-
}
|
| 144 |
|
| 145 |
/*var creditsyear = new Date();
|
| 146 |
document.getElementById("datacedencer").innerHTML = creditsyear.getFullYear();*/
|
|
|
|
| 108 |
});
|
| 109 |
|
| 110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
|
| 112 |
/*var creditsyear = new Date();
|
| 113 |
document.getElementById("datacedencer").innerHTML = creditsyear.getFullYear();*/
|