Coding style:
* Avoid meaningless '_' in variable names, especially when used
inconsistently.
* Avoid trailing line comments.
* Consistent if/else curly brace position.
* Consistently use single quotes (there are no magic quotes in js).
* Consistently use $ in variable names of jQuery-wrapped elements
(as opposed to plain node references).
* Avoid using variable names like '_this' or 'that', instead name
them after the object.
* Too many var statements.
* Hoist var statement.
* Fix alignment of closing parentheses in initEditPage.
Code quality:
* Remove commented out code.
* Add missing radix parameter for parseInt.
* Remove unused private function "printWithRunin".
* Remove unused parameters.
* Don't call "console.log" in production client-side code because
the console doesn't always exist in normal browser modes (and
would result in an Uncaught ReferenceError, aborting the script
unexpectedly and leaving the user interface in a likely
unresponsive state).
* Use the Promise.done and Promise.fail handlers of mw.Api,
instead of the deprecated 'ok' and 'err' parameters.
* Use jQuery#on instead of the deprecated jQuery#bind.
* Use a local shared reference to the singleton instead of relying
on 'this' context, this way the methods can be called
regardless of context. Such as in the $(document).ready(), or
when passing around setErrors callback.
* Avoid using invalid html shortcuts like <div/>, use <tag>
for creation, and <tag>..</tag> for parsing (per style guide).
* Document inputKeydown parameter being jQuery.Event (as oppposed
to native Event).
Misc:
* Renamed '_in' to 'in', and renamed again to 'input' ('in' is an
illegal variable name and would've crashed).
Change-Id: I283fda1409b1e76db56a939183bdaefc95e60961
This doesn't have the wanted result; breaking ml projects
Bug: 58074
This reverts commit 336116f9cf.
Change-Id: I7a0ee61da14b59231009664bde62a7f7095a43cb
Apparently this is useful on Commons, where they would like to iterate
over all language names in some of their templates.
Bug: 47833
Change-Id: I6e3291bedc72da6630c485ea9bf381d8d2f5453a
This field already exists in PHP with exactly the content requested in
bug 47089, so we may as well expose it on the frame object.
Bug: 47089
Change-Id: I672820589f6ebc7c4daad29b5eb156733a5bc5cc
When the "Allow saving code with errors" checkbox is used, an
automatically-added tracking category would be useful. And we may as
well also include the error message that would have been displayed when
trying to save without that checkbox checked.
Bug: 39605
Change-Id: Ideb72a58887fb1187b9adba80b7245cdca070ce4
This patch adds Malayalam language aliases for NS
828 and 829 per bug 54951 comment 7 (by praveenp)
and Santhosh's suggestion in bug 54951 comment 9.
Bug: 54951
Change-Id: I933f81782f3482334c9a8d820d4ea2b1120f5c59
It's already possible to detect whether the current template is being
substituted via ParserFunctions (see [[en:Template:Ifsubst]]), and a
similar trick works with frame:preprocess. So we may as well provide the
flag directly.
Bug: 47828
Change-Id: Id06d27c6283ee589a8830b78c04e56978e0ac6da
Specifically:
* String conversion in non-URL contexts (e.g. .prefixedText) uses spaces
instead of underscores.
* Setting .fragment now applies the same transformations that are done
(in PHP) by mw.title.new.
Bug: 56217
Change-Id: I12e354636bcde3327864088175fb4de61aecc81a
The PHP call that makes mw.site.namespaces work case-insensitively
doesn't handle non-standard spaces/underscores. So standardize them
before the call.
Bug: 56216
Change-Id: I4758478b126858fb581614f64eb15472f42fef51
The following are now correctly escaped:
* Blank lines (including those with only tabs)
* ---- at the start of a line
Bug: 53658
Change-Id: Ib000ff4f21f76c310741de89de0e0b66f6450344
The following are now correctly escaped:
* Space at the start of a line
* Start-of-line characters after \r
* Magic links such as "RFC 123" with non-space whitespace
* URIs that don't use "://", such as "urn:foo"
* Double-underscore magic words
Bug: 53658
Change-Id: I824417e2937dd27cd1e69bd4e74ab7d21a978c75