| ▲ | karel-3d 2 hours ago |
| wait as a wikipedia user you can just put random JS to some settings and it will just... run? privileged? this is both really cool and really really insane |
|
| ▲ | kemayo 2 hours ago | parent | next [-] |
| It's a mediawiki feature: there's a set of pages that get treated as JS/CSS and shown for either all users or specifically you. You do need to be an admin to edit the ones that get shown to all users. https://www.mediawiki.org/wiki/Manual:Interface/JavaScript |
|
| ▲ | hk__2 2 hours ago | parent | prev [-] |
| Yes, you can have your own JS/CSS that’s injected in every page. This is pretty useful for widgets, editing tools, or to customize the website’s apparence. |
| |
| ▲ | karel-3d 2 hours ago | parent [-] | | It sounds very dangerous to me but who am I to judge. | | |
| ▲ | Brian_K_White 2 hours ago | parent | next [-] | | It's nothing. For the global ones that need admin permissions to edit, it's no different from all the other code of mediawiki itself like the php. For the user scripts, it's no worse than the fact that you can run tampermonkey in your browser and have it modify every page from evry site in whatever way your want. | |
| ▲ | bawolff 18 minutes ago | parent | prev | next [-] | | It is kind of risky - you now have an entire, mostly unreviewed, ecosystem of javascript code, that users can experiment with. However its been really useful to allow power users to customize the interface to their needs. It also is sort of a pressure release for when official devs are too slow for meeting needs. At this point wikipedia has become very dependent on it. | |
| ▲ | corndoge 2 hours ago | parent | prev [-] | | That is how Mediawiki works. Everything is a page, including CSS and JS. It is not really different than including JS in a webpage anywhere else. |
|
|