alistair3149
1b7025ef85
feat(toc): ✨ expand the current active section
2024-09-10 22:07:22 -04:00
alistair3149
8640d4ef30
feat(toc): ✨ switch to ToC implementation based on Vector 2022
...
This will serve as the groundwork of merging the intersection observers
and collapsible toc in the future.
2024-09-10 18:28:12 -04:00
github-actions
26076514c1
ci: 👷 lint code to MediaWiki standards
...
Check commit and GitHub actions for more details
2024-06-07 19:01:54 +00:00
alistair3149
ae6d207fb4
fix(core): 🐛 escape double quotes for toc selector
2024-05-25 06:57:02 -04:00
alistair3149
a405d64616
refactor(core): ♻️ various performance and style improvements
2024-05-21 18:08:28 -04:00
alistair3149
9cd0cc45f3
fix(toc): 🐛 CSS escape ID
...
When the heading contains an amprehend, it will throw an exception.
2024-04-25 23:33:22 -04:00
alistair3149
cd21fd05f3
fix(core): 🐛 make ToC tracking work for non-content pages
...
Since MW 1.40, ToC has been enabled on all pages including non-content page.
By generating a list of elements to track through the ToC instead of targeting
specific classes, it should be more resilient and will work for non-content pages.
2024-04-20 01:32:37 -04:00
github-actions
dc3ca54d43
ci: 👷 lint code to MediaWiki standards
...
Check commit and GitHub actions for more details
2023-12-13 22:10:24 +00:00
alistair3149
e866edc3a5
fix(toc): 🐛 add null check for link
2023-07-30 19:44:34 -04:00
alistair3149
aef94e31cb
fix(toc): 🐛 init observer only when there are headlines
2023-07-11 22:01:04 -04:00
沈澄心
89a9957cd4
refactor(core): avoid using ES2020+ methods ( #669 )
...
Replace ??, ?., and replaceChildren() for better compatibility; hide pref panel in unsupported browsers
* Update mixins.less
* Update Sections.less
* Update TableOfContents.less
* Update interface-edit-section-links.less
* Update mixins.less
* Update Sections.less
* Update TableOfContents.less
* Update interface-edit-section-links.less
* Update sections.js
* Update tableOfContents.js
* Update mwRestApi.js
* Update mwRestApi.js
* Update skins.citizen.preferences.js
* Update mwActionApi.js
* Update typeahead.js
2023-06-21 14:30:45 -04:00
alistair3149
ce9963467d
refactor(core): ♻️ load content scripts using wikipage.content hook
2023-04-30 18:01:53 -04:00
alistair3149
9652d4f8ed
refactor(core): ♻️ prepare for heading structure changes
2022-11-24 21:46:23 -05:00
alistair3149
3eaeaa15f7
refactor(core): ♻️ pre-work to allow Citizen to render ToC
2022-11-21 17:41:40 -05:00
alistair3149
9d711d4ee2
refactor(core): use scroll-padding-top
for top margin
2022-05-17 15:35:04 -04:00
alistair3149
1be7f5faaf
refactor(core): rewrite ToC scrollspy based on Vector
2022-05-17 15:11:16 -04:00
alistair3149
d59ca5c83a
refactor(core): move intersection observer into a module
...
* We will likely use it for other things in the future
* Based on Vector's implementation
* Also do not get toc element twice
2022-05-13 00:26:53 -04:00
alistair3149
13a2b710ea
refactor(core): remove duplicated check for ToC
2022-05-12 23:24:32 -04:00
alistair3149
508c96ae9d
refactor(core): merge ToC script into core scripts
2022-05-12 17:18:39 -04:00