The loading of the diff styles get lost in 6627f2cd.
In MediaWiki 1.28 the name of the module was renamed from
'mediawiki.action.history.diff' to 'mediawiki.diff.styles'.
Bug: T142845
Change-Id: I86ed2a0568c6bc4e81819633a295cec2e8924215
- load jsconfigvars
- trigger the hooks for wikipage.content and wikipage.diff
- rvdifftotextpst for diffs
- improve section support
This module is not used within WMF, but has some users amongst 3rd
parties.
Change-Id: I7f0b2de4a984d811ccd94149670390929a6182f6
With formatversion=2 the JSON response uses UTF-8 instead of escape sequence
with hex for encoding of non-ASCII characters (e.g. "\u00e4" for "ä").
The JSON response from formatversion=2 has some structural improvements.
This allows a simplification of the processing of the response.
The parameter indexpageids= is not necessary anymore.
Change-Id: Ic08c8ba46b7529952c0fb2f04564b458b55112fd
* Rename 'collection' to 'loadmodules'.
* Consistently close parentheses and brackets at the same
indentation level as they were opened.
* Use $.ajax directly instead of $.post, especially the fourth
argument to $.post makes it hard to read.
* Use promise interface of $.ajax and $.post instead of the
(deprecated) callback parameter.
Change-Id: I48924c9a1ce29829f8994be05c46d5563b2c25d6
eqeqeq:
* Change loose comparisons to strict comparisons where
it seems safe to use a strict comparision instead.
Mostly comparisons to strings or objects, and comparisons to
numbers where the other value is known to be a number, too.
E.g. foo == 'string', bar == node, indexOf() != -1.
* Add eqeqeq:false to files where there are non-obvious usages
left.
onevar, quotmark:
* Disabled in files with lots of style violations.
unused:
* Remove unused variables that have no side-effects in their
assigned expression.
Coding style cleanups on affected lines where trivial.
Change-Id: I5db155a632740e24cb52dba2177c7fc35d5aebd5
* Code clean up in preparation for enabling linting in the future
* Update code to use latest code conventions and best practices:
- Make use of jQuery.Event (e.g. no need to check both e.keyCode
and e.which)
- jQuery: .size() -> .length
- jQuery: (where appropiate) .attr() -> .prop()
Setting properties like 'checked' via attr() has been deprecated
in jQuery.
- Whitespace
- Single quotes instead of double quotes
- Use literal keys in object literals instead of strings
- Pass mediaWiki to closure, use mw. locally instead of "mediaWiki"
global directly.
- Fix indentation
- Brackets around if, else and for bodies
- Strict comparison to 0, null, false, true etc.
- Fix missing radix parameter in parseInt
- Use local $ instead of global $
- Use `foo || bar` instead of `foo ? foo : bar`
- Variable scope hoisting
- Double/redundant variable declarations
- ['foo'] is better written in dot notation
- New line at EOF
- Consistency in jQuery construction:
Tag name for element creation $( '<div>' )
Valid html for html parsing $( '<div foo="bar"></div>' )
- Fix regex escape warnings per JSLint/JSHint.
Do escape ][, don't escape ><
- ..
* Add .jshintrc / .jshintignore
* Updated most files, but not all. Too much at once.
Change-Id: I445639b25a9688b3cdf9e5449e3d31cbcfa9c7ae