Page MenuHomePhabricator

Disabling of user defined CSS/JS via URL command
Closed, DeclinedPublic

Description

Author: marco

Description:
A user should be able to disable the inclusion of User:XY/monobook.js and
User:XY/monobook.css via a url command like
http://de.wikipedia.org/wiki/Michael_Vanrose?css=off.

Actually it could be done as an if query at the position where the exist of the
2 pages is looked.


Version: unspecified
Severity: enhancement
OS: Windows XP
Platform: PC

Details

Reference
bz7365

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:25 PM
bzimport set Reference to bz7365.
bzimport added a subscriber: Unknown Object (MLST).

marco wrote:

In my own monobook I use now

if(location.href.indexOf("disable_css")==-1) {

document.write('<script type="text/javascript" src="' 
+

'http://de.wikipedia.org/w/index.php?title=Benutzer:D/monobook/user.js'

+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
document.write('<link rel="stylesheet" type="text/css" href="'
+

'http://de.wikipedia.org/w/index.php?title=Benutzer:D/monobook/user.css'

+ '&action=raw&ctype=text/css&dontcountme=s"></link>');

}

This should be easily portable.
Marco

marco wrote:

Short:

if(location.href.indexOf("disable_css")==-1) {
...YOUR MONOBOOK...
}

Why would you want to do so? As an user, you can blank those pages or include conditional code as proposed above.

You're probably asking for it to avoid people locking to themselves but
a) You can use another skin &useskin= to avoid loading your monobook js/css
b) You can disable CSS and/or Javascript on your browser at will.

If everything fails, admins can still change that page.

It's not that the problem can't be fixed, but people not knowing the right way to do it. Adding a new parameter which only initiated know won't help on that.

What situation would require that parameter?

marco wrote:

For example if your monobook radically changes the UI but is buggy in printing. So you may want to attach that parameter so prints look just like normal. Or if you want to save pages, but want them to be saved just like normal.

For example if your monobook radically changes the UI but is buggy in printing.

Then you missed some @media screen parameters.

you want to save pages, but want them to be saved just like normal.

just delete the downloaded monobook.css