Page MenuHomePhabricator

Provide per group and per skin global JS and CSS
Open, LowPublicFeature

Description

Aside from MediaWiki:Common.js, MediaWiki already provides (local) MediaWiki:Group-sysop.js (.css) pages which will be loaded only for users in the associated groups, and MediaWiki:Vector.css (.js) which will load only in the specified skin.

Similarly, the extension could provide global JS/CSS for skins and user groups:


Version: unspecified
Severity: enhancement

Details

Reference
bz61748

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:00 AM
bzimport added a project: GlobalCssJs.
bzimport set Reference to bz61748.
bzimport added a subscriber: Unknown Object (MLST).

Sounds reasonable.

I wonder if we should also support CA global groups & the GlobalUserRights extension.

Change 114896 had a related patch set uploaded by Legoktm:
Add support for MediaWiki:Global-$skinname.js/css

https://gerrit.wikimedia.org/r/114896

Change 114896 merged by jenkins-bot:
Add support for MediaWiki:Global-$skinname.js/css

https://gerrit.wikimedia.org/r/114896

Still need to figure out groups.

Also, consider adding

  • [[User:Me/global-vector.js]]
  • [[User:Me/global-vector.css]]
  • [[User:Me/global-monobook.js]]
  • [[User:Me/global-monobook.css]]

etc... (although I doubt someone which uses many wikis will use more than one skin one each of them).

(In reply to Helder from comment #5)

Also, consider adding

  • [[User:Me/global-vector.js]]
  • [[User:Me/global-vector.css]]
  • [[User:Me/global-monobook.js]]
  • [[User:Me/global-monobook.css]]

etc... (although I doubt someone which uses many wikis will use more than
one skin one each of them).

While doing so is extremely trivial, I'd rather not unless there's a strong use case for it.

He7d3r updated the task description. (Show Details)
He7d3r added a project: JavaScript.
He7d3r set Security to None.

Note: I've added a section on https://www.mediawiki.org/wiki/Help:Extension:GlobalCssJs to clarify that it is possible to only run certain CSS/JS on certain skins.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:13 AM
Aklapper removed a subscriber: wikibugs-l-list.