Any fix for Neocities yet?

Author Topic
crumg

Posted 2025-01-26 14:21:51

I only just found out that new neocities accounts block external JS so Im not able to have my status up, I was looking around but was wondering if anyone has found a workaround yet, Thank you !!

mysh

Posted 2025-01-29 15:24:25

There's no way around it, it's a feature of CSP, which in the case of Neocities is set to 'self'. This means that you have to serve files exclusively from their domain.

  • As a very weird way of working around this issue is to mount to your dashboard using Webdav and update your `status.json` when you need it. It's paid feature though.
  • And if you want to violate their Terms of Service, then you can automate logging into your account, replacing `status.json` in your dashboard with a script.

In my opinion, if you want to do those workarounds - better off hosting stuff yourself or using other hosting provider.

Last edited on 2025-01-29 15:24:33

mazapandust

Posted 2025-01-30 23:45:11

really? my neocities site shows my status and my account is relatively new. but i'm also a supporter, maybe that is the difference?

mazapandust.com
mysh

Posted 2025-01-31 08:31:45

mazapandust, you have custom domain (and this is a paid feature), this rule doesn't apply to you since you have different CSP: `upgrade-insecure-requests; default-src 'unsafe-inline' 'unsafe-eval' 'self' data: blob: *`

And so you can do the following:

  • `unsafe-inline` allows the execution of unsafe in-page scripts and event handlers.
  • `unsafe-eval` allows the execution of code injected into DOM APIs such as eval().
  • `default-src *` bypasses the primary features of CSP in general.

Users that didn't pay for premium features, like custom domain name, have to work with *.neocities.org and `neocities.org` CSP and they are quite restrictive

Last edited on 2025-01-31 13:42:23

starry_knight

Posted 2025-02-02 03:28:35

You can use the <iframe> element to display your status without being a supporter.

PetraPixel made a tutorial on how to do this as well as how to customize the iframe/widget. You just have to change the info of the link in the iframe.

Or you can host the status cafe code on GitHub, for example, make the background transparent/remove borders, and link that to the iframe. This is kind of a pain but it's still an option

mysh

Posted 2025-02-03 14:38:29

I completely forgot that <iframe> is a thing. Probably the best option for Crumg.

hexadecimal16

Posted 2025-02-03 19:58:05

speaking of neocities, i think its down

68 65 6C 6C 6F 20 77 6F 72 6C 64 20 69 6D 20 68 65 78