Commit graph

20 commits

Author SHA1 Message Date
Ed Sanders f18aee5bbc Move var declarations inline
Change-Id: Ib952bd8a8eb9e0fce9541c4f9336169416593f3e
2023-11-30 10:58:04 +00:00
Ed Sanders aaaa5b63da JS: Update APIs to make more extensible
* 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
2022-01-25 22:02:15 +00:00
Gergő Tisza 3d17c58922 Use mw.cookie instead of $.cookie
Bug: T254024
Change-Id: If487ef4d14f308fd6da0d6b938e35dc68dca5b5e
2020-05-29 19:44:12 +00:00
Ed Sanders c033679cb8 build: Update eslint-config-wikimedia
Change-Id: I3cbcbb1695896ddc1e54c40dc0da50f91944916f
2019-12-12 11:36:24 +00:00
Ed Sanders e453114f55 Remove obsolete aliases from closures
Bug: T208951
Change-Id: Ie84c06e4a69923a5993b173d490bfa97189c285b
2018-11-12 19:22:46 +00:00
James D. Forrester e315e954a6 build: Replace jshint and jscs with eslint; drop csslint
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
2017-08-03 17:24:34 -07:00
James D. Forrester a23a878953 build: Remove all non-mobile jscs over-rides and make pass
Change-Id: Iecc96b34c2a3bdecdd6d90b4e5d9b76f12604386
2016-04-22 12:47:08 -07:00
Moriel Schottlender 0a5664ce5e Check the thanked user's gender for Thanks messages
Retrieve gender data for the thanked user for i18n message parsing
with the correct {{GENDER...}} data.

Bug: T96527
Change-Id: I14c831be51482682f2b628a15c79341a4f372c16
2015-05-04 17:16:09 -07:00
Roan Kattouw 805fefd198 Actually pass jscs
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
2015-05-04 12:13:43 -07:00
wctaiwan 98726b568b Add "Thanks" for comments on Flow boards
bug: 61930
Change-Id: Id37a14e3c75c63419fc34e0b7c2e21f74b3fa875
Co-authored-by: Bencmq <bencmqwiki@gmail.com>
2014-03-14 11:03:11 +00:00
Siebrand Mazeland 08f8d9ed44 Add GENDER support for 'thanks-error-ratelimited'
Spotted by Matma Rex and reported at
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Thanks-error-ratelimited/en

Change-Id: Ib19f7297e6a99d89cc9465233d1604e55c330bfa
2013-10-07 17:17:18 +02:00
Yuki Shira 77a0e2ea3a Fix confirmThanks() for Diff view
Change-Id: If762f7ee600ca3cb040ed4a1cf2875d01586ce90
2013-07-09 16:54:19 -07:00
MatmaRex 615ec96adf Quote 'class' in JS object literals
It's a reserved word, old IEs see this and bail. (Conforming browsers
correctly see it's an object key and parse the literal.)

Reported on the English Wikipedia's WP:VPT.

Change-Id: I7a032afc6d62d09a5ec32c7c8d0af5611665ea59
2013-06-13 18:11:14 +02:00
kaldari 68b1918231 Everyone hates Christmas so we're getting rid of it!
Removing red coloration for Cancel button - too garish according to
feedback.

Change-Id: I00beb9f59b931d1becf23cd5a3d62ea9ec98b9b8
2013-06-12 15:49:43 -07:00
kaldari aa2f23517b Adding optional confirmation process to Thanks workflow
If the new $wgThanksConfirmationRequired global variable is true,
require users to confirm that they want to send thanks.

Bug: 47658
Change-Id: I4663844a324a2797917b027ceb1c8c07b1e180d5
2013-06-10 12:05:09 -07:00
jenkins-bot f02745e2d5 Merge "Prevent short-term duplicate thanking" 2013-04-29 05:59:29 +00:00
ebernhardson a4cfb9ded6 Prevent short-term duplicate thanking
Thanked revision to be stored both server side in the session and client side
in a cookie.  Thanked revisions found in either storage solution will replace
their 'thank' link with the string 'thanked'.
Bug: 46690
Change-Id: I976cd8fbf00856c67b77daeb0d0a952efb371661
2013-04-28 22:58:28 -07:00
ebernhardson df908474b8 thanks-thanked message needs GENDER support
Bug: 46595
Change-Id: I7061403808d428ad244b75ebdcdb2dc900acd3bf
2013-04-26 10:48:42 -07:00
kaldari e3a4b724c1 Adding some comments for the API
Adding .jshintrc file

Change-Id: Ib15a3b3ce2c37933b62ccb112a38b1d61051ca16
2013-04-05 17:36:31 -07:00
Kaldari bc369fdf85 Initial version of Thanks extension
See https://www.mediawiki.org/wiki/Extension:Thanks

Change-Id: Ic037f1fcde0f7fa10848c2ed8e31291ad022027d
2013-03-21 11:33:50 -07:00