ransei
1 week ago
Wow! Thanks for your fast feedback! I'm glad to see it was worth all that spent time :3
ransei
1 week ago
Doesn't work :/ I've heard they loosen policy after some time, but considering your site is almost same age as mine, I'm not sure what could cause this...
404city
1 week ago
Hi! You usually donβt need to be a supporter to add these things to your webpage. Most of these applications give you an iFrame code or something similar, which works without CSP error. If youβre getting an error, itβs probably because of your app's JS code is trying to fetch or read an external file, which wonβt work for free users on Neocities. If you can share your code with me, I can help you better with it :3
ransei
1 week ago
Thank you! For example do you know a good way add a status from https://status.cafe/ to the website? This is the code site tells me:
ransei
1 week ago
I omitted tag chars of html to be visible: div id="statuscafe" div id="statuscafe-username" /div div id="statuscafe-content" /div /div script src="https://status.cafe/current-status.js?name=ransei422" defer /script
404city
1 week ago
I checked your source code, and it looks like you're using the script from your own site (script src="assets/js/status.js" defer/script), which is probably why you got a CSP error. Instead, try using the original hotlink like this: script src="https://status.cafe/current-status.js?name=ransei422" defer/script. Hope that solves :)
ransei
1 week ago
Thanks! I tried as you said: script γsrc="https://status.cafe/current-status.js?name=ransei422" /scriptγ, but after uploading to neocities I'm still seeing "Refused to connect to 'https://status.cafe/users/ransei422/status.json' because it violates the following Content Security Policy directive: "connect-src 'self' data: blob:".""
ransei
1 week ago
Looks like this line from js source is causing the problem: "fetch("https://status.cafe/users/ransei422/status.json")"
404city
1 week ago
Hmm... I don't get it. It works fine for me, I even tried to use your own script hotlink on a temporary html file on my site and it showed me your status without any problem. Have you ever tried to hard refresh (CTRL + F5) after updating the code?
ransei
1 week ago
Yeah, but nothing seems to work :/ Iβve heard that the CSP tends to loosen up as the account gets older. Still, since your site is about the same age as mine, that doesnβt really make much sense...
404city
1 week ago
Well, I guess so. I don't have any other idea. Wish I could help about it. Hope you don't mind... :(
ransei
1 week ago
Thats okay! Thank you anyway :) I may have one more reason to become supporter now :D
Did some CSS changes - if site not loading properly elements, try to delete caches :)
There is a neat trick to make your latest CSS load after a change. I use this method and found it reliable π https://sebhastian.com/css-versioning/
thanks flotsam! I'll use it in future :)