Topic on Skin talk:Vector

GhostInTheMachine (talkcontribs)

What is the official / correct way for a user script to test for a page being viewed by a user that is configured to use the new evil Vector rather than the real Vector? They both show up as

mw.config.get('skin') = "vector"

~~~~

Tacsipacsi (talkcontribs)

I don’t know how official or future proof this is, but

$('body').is('.skin-vector-legacy')

is the original Vector. (It works 100% correctly at the moment.)

GhostInTheMachine (talkcontribs)

Real Vector returns -- mw.config.get('skin') = 'vector'
and has body tag classes -- "skin-vector" and "skin-vector-legacy"

Evil Vector now returns -- mw.config.get('skin') = 'vector-2022'
and has body tag classes -- "skin-vector" and "skin-vector-2022"
(not sure when that started)

Tacsipacsi (talkcontribs)
Reply to "New Vector?"