|
1 | 1 | // ==UserScript== |
2 | 2 | // @name JPDB Userscript (6a67) |
3 | 3 | // @namespace http://tampermonkey.net/ |
4 | | -// @version 0.1.172 |
| 4 | +// @version 0.1.173 |
5 | 5 | // @description Script for JPDB that adds some styling and functionality |
6 | 6 | // @match *://jpdb.io/* |
7 | 7 | // @grant GM_addStyle |
|
269 | 269 | }); |
270 | 270 |
|
271 | 271 | settings.showAdvancedSettings = new UserSetting('showAdvancedSettings', false, 'Show advanced settings'); |
272 | | - settings.advancedStaticUserButtonsOnSmallScreens = new UserSetting( |
273 | | - 'advancedStaticUserButtonsOnSmallScreens', |
| 272 | + settings.advancedStaticAnswerButtonsOnSmallScreens = new UserSetting( |
| 273 | + 'advancedStaticAnswerButtonsOnSmallScreens', |
274 | 274 | false, |
275 | | - 'Static user buttons on small screens', |
| 275 | + 'Static answer buttons on small screens', |
276 | 276 | { |
277 | 277 | longDescription: 'Move the answer buttons to the bottom of the page on small screens instead of floating.', |
278 | 278 | dependency: settings.showAdvancedSettings |
279 | 279 | } |
280 | 280 | ); |
| 281 | + settings.advancedTransparentBackgroundAnswerButtons = new UserSetting( |
| 282 | + 'advancedTransparentBackgroundAnswerButtons', |
| 283 | + false, |
| 284 | + 'Transparent answer buttons background on small screens', |
| 285 | + { |
| 286 | + longDescription: 'Make the answer buttons background transparent on small screens.', |
| 287 | + dependency: settings.showAdvancedSettings |
| 288 | + } |
| 289 | + ); |
281 | 290 | settings.advancedYomiVocabAudioServer = new UserSetting( |
282 | 291 | 'advancedYomiVocabAudioServer', |
283 | 292 | '', |
|
544 | 553 | |
545 | 554 | :is(html.dark-mode) .tooltip:before { |
546 | 555 | background-color: #101518; |
| 556 | + pointer-events: none; |
547 | 557 | } |
548 | 558 | |
549 | 559 | body, |
550 | 560 | input { |
551 | | - font-family: 'Manrope', 'Nunito Sans', 'Extra Sans JP', 'Noto Sans Symbols2', 'Segoe UI', 'Noto Sans JP', 'Noto Sans CJK JP', 'Hiragino Sans GB', 'Meiryo', sans-serif; |
552 | 561 | } |
553 | 562 | |
554 | 563 | input[type='button'], |
|
1002 | 1011 | display: none; |
1003 | 1012 | } |
1004 | 1013 | } |
| 1014 | + `, |
| 1015 | + |
| 1016 | + transparentBackgroundAnswerButtons: ` |
| 1017 | + @media screen and (max-height: 600px) { |
| 1018 | + .review-button-group { |
| 1019 | + background-color: transparent; |
| 1020 | + pointer-events: none; |
| 1021 | + } |
| 1022 | + .review-button-group input { |
| 1023 | + opacity: 1; |
| 1024 | + pointer-events: auto; |
| 1025 | + } |
| 1026 | + } |
1005 | 1027 | ` |
1006 | 1028 | }; |
1007 | 1029 |
|
|
1330 | 1352 | if (USER_SETTINGS.enableReplaceKanjiStrokeOrder() && !USER_SETTINGS.useFontInsteadOfSvg()) { |
1331 | 1353 | GM_addStyle(STYLES.hideKanjiSvg); |
1332 | 1354 | } |
1333 | | - if (USER_SETTINGS.advancedStaticUserButtonsOnSmallScreens()) { |
| 1355 | + if (USER_SETTINGS.advancedStaticAnswerButtonsOnSmallScreens()) { |
1334 | 1356 | GM_addStyle(STYLES.staticAnswerButtons); |
1335 | 1357 | } |
| 1358 | + if (USER_SETTINGS.advancedTransparentBackgroundAnswerButtons()) { |
| 1359 | + GM_addStyle(STYLES.transparentBackgroundAnswerButtons); |
| 1360 | + } |
1336 | 1361 | } |
1337 | 1362 |
|
1338 | 1363 | async function injectFont() { |
|
0 commit comments