This adds support for thanking for log entries. It gets the log
ID from and attribute on the thank link (which does not yet have
this; that will come in T187485), and sets the source to be 'log'
if it's being called from Special:Log (this can be extended in
the future if we want to thank for log entries from elsewhere).
Bug: T186921
Change-Id: Ifdb458b873ed4f1e6e64760658d2293aba1e02b3
Many log entries are associated to (exactly one) revision,
and for these (only, and only where the log type is
whitelisted) we add a thank-link that behaves exactly
as the thank-link on diff and history pages.
Bug: T189752
Change-Id: I5f4e84c65d4fe2d95b20cdb3c3f9522ad3e5f422
Due to confusion between $thankLinks (plural)
and $thankLink (singular), clicking any thank link
was sending thank for the first thankable revision
on the page.
Introduced in I9097bd976f8da1632577a3f4438b9f1186baca88
Bug: T187757
Change-Id: I7993531206c46657908a66d73369928ccf5dc677
* Explicit return null instead of no return.
* Document right @return type.
* Avoid else paths by using early return.
Change-Id: I24c434ebb57188346ad7cd722f08390ba6da2c34
That way we don't have to do an API request to get the gender,
and we'll also be able to use gender-sensitive messages in the
confirmation step.
Bug: T159302
Change-Id: I9097bd976f8da1632577a3f4438b9f1186baca88
Removing csslint rather than replacing it with stylelint as there
are no CSS or LESS files in this repo.
Also bumping banana and jsonlint to latest.
Change-Id: I9ffce273f63b061e07c3fa90ab4e82b5e551aa92
Rather than using mobile.startup, switch
to using mediawiki.notification which is more
lightweight and does same thing.
Bug: T155801
Change-Id: I23d75272602766e24e8b01410f4a88609eda6dee
Thanks listens to a hook fired by Revision Slider on diff reload
(added in I02a8736d00e6560d0807888c957b0e9aa3e80bb8).
Bug: T142636
Change-Id: I0e6c0072a9fe46c02b8ccbe528a9b87f0381bd65
"edit" type tokens have been deprecated in favour of the
more generic "csrf" type tokens.
This has been causing warnings since: 65077ede90
See also https://www.mediawiki.org/wiki/API:Tokens
Bug: T134532
Change-Id: I3ce3c1e6a40f8a21c931c77314021e2ae94e5fb7
Thanks has an implicit dependency on jquery.findWithParent.
It often fails because it is not yet loaded.
Adding it locally so it is self-contained. It is not
Flow's responsibility to provide such low-level utilities
to other extensions.
Bug: T116146
Change-Id: Id74e77b5fb81d5da8cb6dd97fd1b90e5d974ae82
Retrieve gender data for the thanked user for i18n message parsing
with the correct {{GENDER...}} data.
Bug: T96527
Change-Id: I14c831be51482682f2b628a15c79341a4f372c16
Removed exemptions from .jscsrc and fixed the code so jscs still passes.
Kept the exemption for disallowDanglingUnderscores because
of the naming convention for private functions in this repo.
Change-Id: I860f73394a2b92a411fe682abbb2ab0b5e1325f9
* Flow no-longer allows arbitrary html insertion, so remove
* Update ext.thanks.flowthank.js to work with thank links generated
directly by flow.
Change-Id: I8ae14352f1b177446f3696ffadd6921a5125238e
Single-topic views do not have a flow-topics wrapper, making Thanks broken
in those views.
Bug: 63205
Change-Id: I19c7d2da2d409f8c0a270600b092d504255d4111