Page MenuHomePhabricator

Provide example JS to disable compact language links globally
Closed, ResolvedPublic

Description

For some advanced usecases, users may want to disable the compact language links feature. Although it is possible to disable it on individual wikis, for some activities requiring to process many wikis it may be convenient to be able to do it globally.

Since this is a really advanced scenario (and global settings are not available yet) it may be enough to provide an example Javascript code for the user to add at global.js

Event Timeline

Restricted Application added a project: UniversalLanguageSelector. · View Herald TranscriptJun 21 2016, 8:14 AM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript
JAnD added a subscriber: JAnD.Jul 1 2016, 8:33 AM
new mw.Api().saveOption('compact-language-links', 0 );

Will do it. Make sure to load the required ResourceLoader modules and execute only after page ready. The effect will be visible only after page reload.

NOTE: This is hack and assumes whoever doing this know what they are doing.
Elitre added a subscriber: Elitre.Jul 18 2016, 1:54 PM
Amire80 closed this task as Resolved.Nov 3 2017, 8:50 AM
Amire80 claimed this task.
Amire80 added a subscriber: Amire80.

Resolved in Santhosh's comment, and I, too, must emphasize that this is a hack.