This has never been published, and there is very little public API
to publish. Use stanard jsdoc config in ESLint.
sendThanks doesn't need to return false as the return value is
never used.
Change-Id: I02dd9c83511afa5a6e66faf8e96d240eb2464ce3
In detail:
* Use more compact syntax to avoid a bit of code duplication.
* Use createMock() shortcut in tests.
* Avoid hiding code in strings.
* Remove a comment that literally repeats what the code says.
Change-Id: Ibedef380489451268e2e87f0864164e8f9737913
* Don't require a jQuery element with a specific attribute
to record thanks. Instead pass in the thanked ID directly.
* In Flow, don't override the cookieName static property,
instead pass it in as an argument.
Change the static property (effectively a global) prevents
us from having multiple types of thanks on the same page.
Change-Id: Ia569f8636f070f2af69f89d7da66c9a6f9821d24
Users that have already been thanked have the link "thank" replaced
with the message "thanked".
This allows skins e.g. Minerva to style this differently from the rest
of the content.
Change-Id: Iacf7d840cf088afdad6d93ace0f69bf225e05cfa
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
It was already being used when changing a "thank" link to a "thanked"
message because the user just clicked it and thanked that person, but
not when updating links on page load for things the user had already
thanked previously.
Bug: T190563
Change-Id: I4c5758ef446aa2712ae27a1c784555cbf23806f9
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