提交图

41 次代码提交

作者 SHA1 备注 提交日期
44bcedaba3
refactor: change cookie name
add function name
update package infomation
2023-11-23 12:20:46 +08:00
6d8f86338c
partially revert to es5
Signed-off-by: WaitSpring <me@waitspring.com>
2023-11-23 11:10:25 +08:00
da07ebef0a
chore: update domain name
Signed-off-by: WaitSpring <me@waitspring.com>
2023-10-15 13:22:11 +08:00
1501aecaaa
rename; merge addModules()
Signed-off-by: WaitSpring <me@waitspring.com>
2023-10-07 18:51:10 +08:00
4b27babaf0
update package settings
Signed-off-by: WaitSpring <me@waitspring.com>
2023-10-05 16:43:39 +08:00
eb9add3d08
add ext.DarkMode.EmojiWrap.js as a separate module
Signed-off-by: WaitSpring <me@waitspring.com>
2023-10-03 00:31:53 +08:00
7f9e99a7ab
add ext.DarkMode.EmojiWrap.js
Signed-off-by: WaitSpring <me@waitspring.com>
2023-10-02 21:26:43 +08:00
a2e3b4da5d chore: JSON format lint
Signed-off-by: WaitSpring <me@waitspring.com>
2023-07-10 09:46:43 +08:00
8f36612f3b minor fix
Signed-off-by: WaitSpring <me@waitspring.com>
2023-05-15 22:43:41 +08:00
64da481ffd minor fix
Signed-off-by: WaitSpring <me@waitspring.com>
2023-05-15 22:42:59 +08:00
6d15d943f7 minor fix
Signed-off-by: WaitSpring <me@waitspring.com>
2023-05-15 22:42:53 +08:00
ec7115f8e7 bump to 0.4.0
Signed-off-by: WaitSpring <me@waitspring.com>
2023-05-15 22:33:49 +08:00
515c9f23cb minor fix
Signed-off-by: WaitSpring <me@waitspring.com>
2023-05-15 22:30:26 +08:00
970bb7b1fd remove "targets"
Signed-off-by: WaitSpring <me@waitspring.com>
2023-05-15 22:27:11 +08:00
5d3926718a minor fix
Signed-off-by: WaitSpring <me@waitspring.com>
2023-05-15 22:21:28 +08:00
0643199179 remove dependencies
Signed-off-by: WaitSpring <me@waitspring.com>
2023-05-15 22:13:11 +08:00
721fa8afeb rename
Signed-off-by: WaitSpring <me@waitspring.com>
2023-05-15 22:12:09 +08:00
241eb45f53 rename
Signed-off-by: WaitSpring <me@waitspring.com>
2023-05-15 22:07:56 +08:00
a068cb8131 minor fix
Signed-off-by: WaitSpring <me@waitspring.com>
2023-05-15 21:50:39 +08:00
92a4ea6009 update package settings
Signed-off-by: WaitSpring <me@waitspring.com>
2023-05-15 21:05:33 +08:00
8d9230b2f3 format
Signed-off-by: WaitSpring <me@waitspring.com>
2023-03-04 12:24:56 +08:00
c033e05e4c remove unused hook
Signed-off-by: WaitSpring <me@waitspring.com>
2023-02-03 08:17:48 +08:00
141483e4a1 add cookies.js
Signed-off-by: WaitSpring <me@waitspring.com>
2023-02-02 21:37:37 +08:00
d049b1766e remove the use of UserOptions
Signed-off-by: WaitSpring <me@waitspring.com>
2023-02-02 21:23:53 +08:00
d0c3e281d7 fix: Cannot read properties of null
Signed-off-by: WaitSpring <me@waitspring.com>
2023-01-25 12:20:54 +08:00
b63b50bce1 rewrite all ext.DarkMode.js
Signed-off-by: WaitSpring <me@waitspring.com>
2023-01-25 12:03:40 +08:00
2ebc5e916d eslint fix
Signed-off-by: WaitSpring <me@waitspring.com>
2023-01-24 10:44:48 +08:00
5630021e71 test: add mw.Api
Signed-off-by: WaitSpring <me@waitspring.com>
2023-01-23 23:32:49 +08:00
aed57df1b0 remove PHP code
Signed-off-by: WaitSpring <me@waitspring.com>
2023-01-23 12:11:41 +08:00
8391c7b38a update URL 2023-01-19 22:58:31 +08:00
Jon Robson
d7ee54f8dc Dark mode code should load on mobile and desktop targets
This was not really how we envisioned to use this.
To support dismantling the targets system these definitions should
not be set.

Bug: T127268
Change-Id: Ie2fd46386e6fcda47d871d0ae950315ed423ac3b
2022-11-21 15:27:19 -08:00
Fomafix
8963827c13 Replace PersonalUrlsHook by SkinTemplateNavigation__UniversalHook
Bug: T310017
Change-Id: I8490d991a68ae1881886febb42c381b42eee7db5
2022-09-11 19:18:25 +00:00
Ed Sanders
e8adcde5d4 Add config description
Change-Id: Ibc77b1421396d7556d35baa319ff505a84079cf4
2022-08-02 14:16:01 +01:00
MusikAnimal
e35ceaa79e Add support for Vector 2022 and update dark mode styles
* In Vector 2022, the link now uses the 'moon' and 'bright' icons from
  the OOUI accessibility icon set
* Sync CSS from enwiki gadget
* Add tooltips to the links
* Use 'ext-darkmode-link' as the selector, per convention
* Refactor and cleanup the Hooks class
* Update JS to use ES6, since the CSS isn't supported by IE anyways
* Bump to version 0.2.0 and set MW requirement to >= 1.38.0

Change-Id: I454b0d7060818afb8c9c4635fd82e24de6de1d76
2022-07-31 16:16:48 -04:00
Fomafix
8361e96162 Use AutoloadNamespaces instead of AutoloadClasses
Change-Id: I305ca3236c110771d023236ffc94fb658b53bb01
2021-11-28 20:09:48 +00:00
Fomafix
a57235393e Inject UserOptionsLookup
Change-Id: Ib6a6560ece40820f5c9cdca661837da615b197c3
2021-10-22 15:21:39 +00:00
MusikAnimal
8c3de948ce Add config var for placement of toggle link
Use new hook handler system with DI, bump minimum MW version.

Other minor code tweaks.

Bump version to 0.1.0

Bug: T285171
Change-Id: Id128daf7519cfb2e781fd34672a798ff7ca4fb77
2021-09-03 00:50:02 -04:00
r4356th
0224fa679d Make DarkMode usable by anons and add user pref
Moves "Dark mode" link to the footer to make it usable by everyone.
Adds a URL parameter that allows toggling dark mode for a specific page.
Adds a new user preference that allows toggling dark mode on all pages.

Bug: T241925
Change-Id: I12b92499f64860d921928496ee1b975e3982bb3f
2021-04-27 03:27:46 +06:00
Fomafix
d499f6c4f1 Move styles to a separate style module
This prevents a missing icon while loading.

Change-Id: Idd98bcbb9a91fc4bf2a3e3fb50ad0671831a51d8
2020-01-21 06:46:47 +01:00
MusikAnimal
35855e4111 Add CSS and toggling for dark mode
This makes the extension functional. Making the dark mode preference
stick (either by cookie, localStorage or hidden preference) will be
tackled in a separate patch. The design of the toggle link is still
pending. For now it cheaply shows unicode moon and sun icons.

Note two StyleLint rules were disabled:
* no-descending-specificity - The CSS is currently organized by what the
  selectors target, whether it be MediaWiki, or wiki/skin dependent.
  This linter rule won't allow for this organization.
* selector-max-id - We need to target IDs to properly override some
  styles that are added by MediaWiki.

Update Node dependencies

Bug: T222470
Change-Id: I665f98de4951ea92e7c5ad35a8cf9e0c63f5c8db
2019-05-08 00:18:20 -04:00
MusikAnimal
4eff03632c Initial draft for DarkMode extension
This includes just the basics. A link for "Dark mode" is added to the
personal toolbar, but this is not a final design, nor is it actually
functional. Actual functionality to come with a subsequent patch.

Bug: T221877
Change-Id: I89d9c17a701221c31bd6c4180dce038f1936fc06
2019-05-03 13:08:17 -04:00