Dannarchy

dannarchy.com

9,215,435 views
1,578 followers
14,790 updates
0 tips
Yo Dan! @predawka emailed me a fix for the viewcount tutorial, I can't find your email to forward it to you though. I'm just gonna dump it here if that's chill with you: https://pastebin.com/raw/dw7s2Th3 (Bonus tip: when I got to the screen where I create an application or "worker," I had to pick the Hello World template and then find the button to edit the code to find a place to paste this script in)
20 likes
6 likes
oaaky's avatar oaaky 2 months ago

thanks for sharing this!

3 likes
brachypelmide's avatar brachypelmide 2 months ago

this is my first time seeing a script on how to access the api. i assume fetching sitedata from the api using a simple fetch() function in a script on your website is blocked by neocities? cause it be a hell of a lot easier to just do that

2 likes
predawka's avatar predawka 2 months ago

@brachypelmide yes, since 2024 neocities blocks any fetch calls for new free accounts. @dann's tutorial mentions this, @dabric has made an article detailing how the neocities csp works: https://content-security-policy.neocities.org/

3 likes
v0idspace's avatar v0idspace 2 months ago

How can i use this in order to make my "last updated xx.xx.xx" widget work again? Because afaik it uses the same method here.

2 likes
predawka's avatar predawka 2 months ago

@v0idspace it's the same data fields you're formatting, only the proxy through which you get that data changes, so the last updated field will still work - i have it too

4 likes
brachypelmide's avatar brachypelmide 2 months ago

@predawka ah damn that sucks. i assume that was probably done to reduce load @v0idspace i THINK you should just be able to fetch the worker URL and get a working infoset from that (psuedocode, i suck at async: https://pastebin.com/raw/vHsrwMGi)

2 likes
v0idspace's avatar v0idspace 2 months ago

Thank you! I dont know if im gonna go trough with this because i dont wanna make another account for something, but i will keep it in mind!

2 likes
dann's avatar dann 2 months ago

Thanks for this. I need to brush up on Cloudflare, workers, and all the things I've missed by living in the past. At a glance, it appears to be doing the same thing that the weirdscifi proxy was doing--mainly handling the API call on the server side where Cross Origin isn't an issue, and then making it public again without the restriction.

2 likes
dann's avatar dann 2 months ago

It would be cool is the site name could be passed as a variable, but I'm not sure if that's possible. I'd just host it myself on my PHP server, but godaddy has me in this grandfathered plan where I get unlimited domains and space, but none of the modern stuff like SSL, which neocities won't touch unless implemented.

2 likes
dann's avatar dann 2 months ago

I might see if I can still use cloudflare on one of my sites to get HTTPS active, then I won't be relying on others.

2 likes
jefbecker's avatar jefbecker 2 months ago

That's nice. I'll give it a try since I already have a Cloudflare account. Thanks for the tip!

1 like
jefbecker's avatar jefbecker 2 months ago

My god, this is so damn easy I can't believe it. It's just a couple of clicks, paste and deploy. Thank you so much, guys!

2 likes

Website Stats

Last updated 1 day ago
CreatedMar 25, 2019

Tags

videogames design programming nostalgia personal