summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-06-19 03:19:43 -0700
committerLogan Hunt <loganhunt@simponic.xyz>2022-06-19 03:19:43 -0700
commit1d006283f3397f2e517d1ad2e934646b0b7400c9 (patch)
treee169b64cde28d35dafafd8e22a666809ace4fcc7
parent797fd0eea058d54fe45fa057e9c59f07475082fd (diff)
downloadsimponic.xyz-1d006283f3397f2e517d1ad2e934646b0b7400c9.tar.gz
simponic.xyz-1d006283f3397f2e517d1ad2e934646b0b7400c9.zip
Remove a console.log in julia, add callback function
-rw-r--r--js-scripts/queryJsonPlaceholder.js13
-rw-r--r--julia/julia.js1
2 files changed, 9 insertions, 5 deletions
diff --git a/js-scripts/queryJsonPlaceholder.js b/js-scripts/queryJsonPlaceholder.js
index e8b7ea2..dd6e21e 100644
--- a/js-scripts/queryJsonPlaceholder.js
+++ b/js-scripts/queryJsonPlaceholder.js
@@ -1,7 +1,12 @@
// Testing to see if I can make API calls on a site that has CSP headers. However,
// this certain site does not have those headers on their error page, so by creating
-// an iframe on the document root with this source we can make an api call to another
+// an iframe on the document root with the error page we can make an api call to another
// service, maybe?
-fetch('https://jsonplaceholder.typicode.com/todos/1')
- .then(response => response.json())
- .then(json => console.log(json))
+
+// Old-school callback hell being forced upon me rn
+function fetchTodos(callback) {
+ fetch('https://jsonplaceholder.typicode.com/todos')
+ .then(response => response.json())
+ .then(callback)
+}
+
diff --git a/julia/julia.js b/julia/julia.js
index 3f31e4b..0099137 100644
--- a/julia/julia.js
+++ b/julia/julia.js
@@ -81,7 +81,6 @@ const startAnim = (sliderId, complexComponentName='ci') => {
};
const start = setInterval(() => {
if (state[complexComponentName] >= C_THRESHOLD) {
- console.log("OVER", C_THRESHOLD);
restart(start);
}