What to put in MediaWiki User Specific common.js

99 views Asked by At

I was just invited onto a wiki that utilizes MediaWiki and I want to get my common.js up and running.

Basically I want to set up a js file that runs when people visit my page. This is possible in MediaWiki by utilizing a file in the wiki called User:ExampleUsername/common.js as shown here. I do not have administrative privileges so I cannot edit MediaWiki:common.js. This is why I must take the User:ExampleUsername/common.js route.

This page User:ExampleUsername/common.js is not made yet on the wiki. I plan to make it.

Once it is made what goes in it? Is is simply a js file that is run on the visit of my page?

1

There are 1 answers

2
AudioBubble On BEST ANSWER

Basically I want to set up a js file that runs when people visit my page.

This isn't possible. If it were, it would be considered a huge security vulnerability.

Your user script page, User:Username/common.js, is only loaded for you when you are logged into the wiki. It does not affect any other users.