Ed Sanders
ea5639b20b
ESLint: Enforce prefer-const
...
Change-Id: I5985d1b532988bb3b71ff1aa24eae57ac2e1b9c5
2024-05-24 16:50:13 +01:00
Ed Sanders
dda9227947
ESLint: Manually fix remaining no-var violations
...
Change-Id: I4474bd0205e7a1ed8e60147e52675e3e0b93ccd9
2024-05-24 16:50:11 +01:00
Ed Sanders
ca5157156a
ESLint: Autofix no-var rule
...
Leave rule off for now as manual fixes are required.
Also temporarily disable prefer-const rule as that
will also require some manual fixes.
Change-Id: I8c3478f26f51287acb943bd38c9c1020c06b9f39
2024-05-24 16:49:36 +01:00
Bartosz Dziewoński
d4c5aebd8f
Prefer short arrow functions
...
When an arrow function body contains just a single `return` statement,
the braces can be omitted.
(Changes are mostly made by `grunt eslint --fix`, with only some line
breaks added by hand.)
Change-Id: I37f259f87085c8d20ed09cfa58a8456dd36cdc38
2024-04-20 00:08:51 +02:00
Ed Sanders
a74c00ba8c
Prefer arrow functions for callbacks
...
This allows us to remove our `this` bindings.
Change-Id: Ie8c8c38d36af8a033b5181870c39f8981a57b939
2024-04-19 12:34:23 +01:00
Ed Sanders
eb92db2b08
topicsubscriptions.js: No longer assume both buttons and links exist in DOM
...
Bug: T360942
Bug: T359751
Change-Id: I98d50a734dc9bd37d7d488ed97d5a47e65790587
2024-03-26 15:17:45 +00:00
Ed Sanders
329a268564
ThreadItem.js: Rename getNativeRange to getRange
...
Makes the class more similar to PHP. The non-native
ranges exist for efficiency, but users will usually
want native ranges.
Change-Id: Ifd7dd034d2e0f3b9af050ecdab3e063df73dde5e
2023-12-15 16:22:52 +00:00
Ed Sanders
2095c5113b
Fix topic subscription icon in Minerva
...
Change-Id: Ic8940696fcabd677e896aeeb7c14cdc2a5df1382
2023-10-13 14:23:10 +01:00
Ed Sanders
da3604d994
topicsubscriptions.js: Factor out initNewTopicsSubscription and expose
...
Change-Id: Ia7c3910fd531d371daeeb41135c82da6edd3306a
2023-08-28 19:54:38 +01:00
David Lynch
9482ec0841
Unregister existing topic subscription handlers on init
...
Bug: T340402
Change-Id: If6907e183b0301e14679b61d7af5119bea006c2b
2023-06-26 11:43:54 -05:00
Ed Sanders
e6a255215f
Add new topics subscription button in Minerva
...
Bug: T332730
Change-Id: Ib6915319eeae4aa32c875decd51e7fd8db4dbd16
2023-03-27 23:28:38 +01:00
Ed Sanders
80dd6e2d7c
Add new topic subscription button to page actions
...
Bug: T263821
Change-Id: Iab7f7d5fd1f7c229c2e0cda9369676cfd401a24e
2023-03-20 14:51:10 +00:00
Ed Sanders
2bae1864bd
New topic notifications
...
Bug: T263821
Change-Id: Ied465e732122a1ee39ab4510f73aca11ef556c35
2023-03-20 14:41:53 +00:00
Ed Sanders
15a8074002
Special:TopicSubscriptions: Perform unsubscribe asynchronously
...
Bug: T327662
Change-Id: Ib7f5cf8b075f44ac06c0a014aa1e200ccda8fe26
2023-02-04 14:30:14 +00:00
Bartosz Dziewoński
6d8f92a6b2
Tweaks for new heading HTML structure
...
Bug: T327328
Bug: T327469
Change-Id: I8c7593e98dc677b28925129dda592dbc24106220
2023-01-20 06:23:23 +01:00
Ed Sanders
da64c43ccc
Show thread metadata in section headers
...
Bug: T269950
Change-Id: Ifa47ddcbccf288be0bbecd5961eab7c5122aab7b
2022-06-23 17:17:09 +01:00
Bartosz Dziewoński
df22a66e42
topicsubscription: Reduce code duplication
...
Rather than making our own ThreadItem objects from scratch,
reuse those used by the rest of the code.
Change-Id: I67f5ea3ad26baffe51b66d0c75467ac00185dd0a
2022-06-20 19:02:46 +02:00
Ed Sanders
bfb3c24ecc
Remove code for handling legacy HTML with data-mw-comment-name
...
This can be merged a few weeks after the commit that introduces
it (If28e1588742), once all the HTML caches have been purged.
Change-Id: I96d2de081a23137fe11a66c8213535219ebfb230
2022-05-14 20:23:45 +00:00
Ed Sanders
48fdcf1056
Remove data-mw-comment-name attribute from subscribe links
...
The HeadingItem's name is now present in the DOM, so just traverse
to it and use that instead.
Change-Id: If28e1588742513d606e3d8fcfb259b85acc0a873
2022-03-28 22:30:59 +01:00
Ed Sanders
215695ad2c
Refactor topic subscription logic
...
This will make it easier to support subscription buttons with
visual enhancements enabled.
Change-Id: I3614eada32885216358143a0cacf65966381679e
2022-03-25 11:57:58 +00:00
Ed Sanders
1032db4878
Move (auto) topic subscription initialisation to separate file
...
Bug: T302805
Change-Id: Ia901cba731233719dd1d5916eb5211a551d34091
2022-03-01 21:27:08 +00:00