No longer create inline scrollbars and/or page-level scrollbarts
with the content escaping the skin container.
This used to be an option in SyntaxHighlighter Geshi (using enclose="div")
but it makes more sense to do by default.
Also move the 'direction' and 'unicode-bidi' rules that currently
live in SyntaxHighlighter extension. Make them the default instead.
Pre-wrap is supported by IE 8+, Firefox 3.5+, Chrome 1+, Opera 8+,
and Safari 3+.
Bug: T103780
Change-Id: Icd8b9bd56d6abc7b64c93e89541cf32c55cf7686
Since jquery.mwExtension is deprecated, fix the undeclared dependency by making
the module not depend on $.ucFirst rather than by declaring the dependency.
Change-Id: I32b57662464e7dde0f61d6875196764fb61dcfba
Removes dependency on the generic jquery.mwExtension module I
wrote in 2011 which has rotten and contains largely unused utilities.
Change-Id: Id7025dc2be958840735f4a9a5b020bd876011740
- Removed space after casts
- Removed spaces in array index
- Added spaces around string concat
- Added space after words: switch, foreach
- else if -> elseif
- Removed parentheses around require_once, because it is not a function
- Added newline at end of file
- Removed double spaces
- Added spaces around operations
- Removed repeated newlines
Bug: T102609
Change-Id: Ib860222b24f8ad8e9062cd4dc42ec88dc63fb49e
The postWithToken() method used to be specific to the edit module.
However that logic was moved and refactored into getToken() and
postWithToken() a while back.
While waiting for user.tokens instead of making api requests for tokens
is worth it. The logic in mediawiki.api.js inspects mw.user.tokens
only at initial run time. So it must be on 'mediawiki.api'.
Anyhow, in practice it doesn't matter since the user.tokens is
embedded in the page. So there's no actual waiting of any kind.
Change-Id: I10fae93c8f1500b4aa752101256fbba94c2ae40d
wgContentLanguage contains the language code of whole project.
wgPageContentLanguage contains the language code of the content of the page.
For example https://translatewiki.net/wiki/Project:About/de?uselang=eo has
* wgContentLanguage en
* wgPageContentLanguage de
* wgUserLanguage eo
The tablesorter works on the content of the page.
Change-Id: I3e51d96c838a3a4f4562c1f27c360d515e4d8ca6
Disable the Special:Preferences 'Save' button if no
settings have been changed (uses keydown and mousedown
events as an alternative to change event, so is not perfect)
This prevents unnecessary saving when you can't remember
if you saved the settings or not.
Bug: T89457
Change-Id: I7c2e11302099280c561e435425b23afb9fb760b5
Remove redundant parameters, use sane defaults.
This changes the cookie name due to mw.cookie adding the standard
cookie prefix. This will cause existing values to be lost.
Bug: T67384
Change-Id: I00ba66b271cef4635ab4c31226c854583b8ba79e
* Remove redundant 'path' parameter (handled by mw.cookie)
* Remove redundant 'expires' parameter (handled by mw.cookie)
* Return value for absent cookie is now reliably 'null'.
This changes the cookie name due to mw.cookie adding the standard
cookie prefix. This will cause existing values to be lost. Make
use of this oppertunity to rename some cookie names.
* mw_hidetoc -> {wikiprefix} hidetoc
* mediaWiki.user.sessionId -> {wikiprefix} mwuser-sessionId
* mediaWiki.user.bucket -> {wikiprefix} mwuser-bucket
This is a re-submission of a4d3d3b427, which was reverted due
to T101857. Commit amended to use "sessionId" instead of "session".
Bug: T67384
Change-Id: Ibe88778cf3b6db90b3875c89305ffba53ac84104
Follows-up 4a3e50a54.
* Merge mediawiki.jqueryMsg.data and mediawiki.jqueryMsg modules.
There's no need for this to be a separate module. The data is not for public consumption,
it's provided to jqueryMsg only.
* Remove unused default-default values for 'allowedHtmlElements'.
* Remove conditionals around data providing at initial run-time. Instead, expose
private method can call that. This way, we don't have two code paths claim
ownership over the namespace. And it makes the module easier to test and re-use
by not requiring the data to exist at first run time.
* Fix getDefinitionSummary() implementation to append data instead of setting
arbitary keys in parent data. ResourceLoader documentation of getDefinitionSummary()
has been updated to reflect this practice.
Change-Id: I40006d39514a997dce4930756a3dac84a0c9bb83
If the length of the string representation of a module exceeds 100,000
characters, decline to store it in localStorage, due to bug T66721.
(While it is true that string length !== byte length, the skew introduced by
counting multi-byte characters as single bytes is not important enough to merit
the use of $.byteLength).
Based on my analysis, the modules that would be ineligible for caching in local
storage under the new schema are:
- ext.visualEditor.core (624 kB)
- oojs-ui (179 kB)
- oojs-ui.styles.icons (132 kB)
To fix this bug, it is not enough to not store new items; we must also ensure
that any old values cached prior to the introduction of a limit are purged. So
update mw.loader.store#prune to do that, too.
Bug: T66721
Change-Id: Ie45467fc0b2db7cc283f30626af7d587da24bd90
This is redundant and creates more modules than necessary.
The use case of not wanting to load "mediawiki.skinning.interface"
in a custom skin is invalid. For this exact purpose we already created
the ResourceLoaderSkinModule class which is generic and re-usable.
Skins can add that class name to their stylesheet file module to
append the logo styles. This way involves no extra modules. Not in
core, and not in any skin.
This reverts commit 43346e1527.
Change-Id: I2b0a1d5ed72f2d5338ad26af6e04227bec45dcc1
It was written before the warnings were added, but merged afterwards,
so this got missed, or something like that.
Change-Id: If2d7d3c41568ae7005dc99101dc6ba8fc038d4a8
* Split off OOjs UI's module definitions to a separate file from
Resources.php.
* Extend ResourceLoaderImageModule to support per-skin images and
variants.
* Allow skins to specify their preferred OOjs UI theme using new
skin registry attribute 'SkinOOUIThemes'. The default remains the
'mediawiki' theme, 'apex' can also be chosen now.
* Implement custom ResourceLoaderOOUIImageModule which implements some
special sauce required to shoehorn OOjs UI image set definitions into
ResourceLoaderImageModule with skin-specific styles support.
Bug: T100895
Change-Id: I3fbacbce95126a4cc29221352f3ef846f41e7b1b