Last modified: 2014-10-13 23:12:02 UTC
There are various bits of JavaScript in Common.js to customise the enwiki experience. It is a shame there are not customisable in LocalSettings.php or bits of code in the JS experience. Let's aim to start removing the need for this code in Common.js in enwiki (and then long term in other projects) and help update our software to meet the use cases/address the gaps that editors of that page have clearly identified. [1] https://en.wikipedia.org/wiki/MediaWiki:Common.js
Common.js ships blank in MediaWiki. I imagine this is meant to be about Wikimedia. :-)
Is this bug intended to be specific for enwiki? In the last months/days we have migrated a few of the scripts which were loaded from common.js[1] to gadgets enabled by default: * Geonotices: https://en.wikipedia.org/wiki/WP:Village_pump_%28technical%29/Archive_129#Migrating_Geonotice_to_a_gadget * Interwiki links to good/featured articles/lists: https://en.wikipedia.org/wiki/MediaWiki_talk:Common.js#Global_gadget_for_LinkFA (this will be superseded by Wikidata badges - bug 40810) * RefTools: https://en.wikipedia.org/wiki/MediaWiki_talk:Common.js#Move_initializeRefTools_to_a_default_gadget But it is likely that similar improvements are still pending on other N wikis. Moreover, we still have to migrate other parts, such as * Extra edit buttons: https://en.wikipedia.org/wiki/MediaWiki:Common.js/edit.js * Addition of links to rendered PNG images in different resolutions: https://en.wikipedia.org/wiki/MediaWiki:Common.js/file.js * Dismiss-able buttons to watchlist messages: https://en.wikipedia.org/wiki/MediaWiki:Common.js/watchlist.js * Loader for [[Meta:WikiMiniAtlas]]: [1] * Old collapsible tables/navframes in[1], to be synced with (and then loaded from) https://www.mediawiki.org/wiki/MediaWiki:Gadget-collapsibleTables.js (jquery.makeCollapsible from core still lacks functionality to be used instead of the local versions, and there are bug reports for them) * Rewriting of links to stay on secure server: https://en.wikipedia.org/wiki/MediaWiki:Common.js/secure_new.js And there are also thinks like: * A workaround for bug 8912 in the bottom of MediaWiki:Common.js/edit.js * Implementation[1] of redirects from /skin.js to the JS page associated to the skin the user is using. This could be added to MediaWiki. [1] https://en.wikipedia.org/wiki/MediaWiki:Common.js
Yes to be clear, I think we should be going through English Wikipedias Common.js and moving code here into the software. I then envision similar bugs for other language projects. To me the need to use Common.js is highlighting issues in the core software that need to be fixed. We should be making the software more efficient. The redirect of User:Jdlrobson/skin.js to User:Jdlrobson/vector.js if I have Vector enabled is a great example. This should be /in/ the software! :) Have updated bug title to be clearer. Sorry.
enwiki sounds like a good starting point (given that a ton of things just get copied directly from there), but that's not to say we shouldn't be improving JS used on other wikis.
I moved the request for a skin.js/css redirect to bug 69555.
Alex: completely agree! I have noticed a lot of cargo cult programming. Japanese Wikipedia for example will copy and paste stuff from English Wikipedia but then it doesn't get updated when English Wikipedia will change. In the long run I think these sort of tweaks to the software will make every project happier.
What about setting $wgUseSiteJs = false on wikis where these scripts were migrated into default gadgets and recommending that as the way to customize the site?
There is probably more interesting code (and likely higher-quality, too) in default-enabled gadgets.