You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was want to create a PR with more hotkeys for quick buttons, but in order to avoid situation like this i decided to ask several questions.
Current list of hotkeys (seems):
Back - Left Arrow
Next - Space or Right Arrow
Settings - Esc
Hide - H
Will be added list of hotkeys:
Auto - A
Save - S
Load - L
Quit - Q
So, questions:
Why do you create another events instead of simulate click?
For example this:
// H Key
case 72:
if($_(`${selector} [data-action="distraction-free"]`).hasClass('fa-eye')){$_(`${selector} [data-action="distraction-free"]`).removeClass('fa-eye');$_(`${selector} [data-action="distraction-free"]`).addClass('fa-eye-slash');$_(`${selector} [data-ui="text"]`).hide();Monogatari.global('distraction-free',true);}elseif($_(`${selector} [data-action="distraction-free"]`).hasClass('fa-eye-slash')){$_(`${selector} [data-action="distraction-free"]`).removeClass('fa-eye-slash');$_(`${selector} [data-action="distraction-free"]`).addClass('fa-eye');$_(`${selector} [data-ui="text"]`).show();Monogatari.global('distraction-free',false);}break;
can be changed to this:
// H Key
case 72:
button.click();break;
So, all the main logic can be placed in the one place instead of kinda copy in various places. I understand that this is architecture question and custom event can perform operations that doesn't related to the main event, but looks like in this situation in can be easily replaced.
I should use selectors like this ${selector} [data-*] in a pair with Aegis, yes? document.querySelector and something like this is not allowed?
The text was updated successfully, but these errors were encountered:
Hey there! Sorry this took a while, a new shortcut was added recently and now s is mapped to a skip mode (similar to auto play but it literally just skips through things) so we'd need to see what to map to that key (save or skip) and what would the other key would be.
About Question 1: Things should probably be added in a single function to prevent the duplicate code just as it was done on 71e99e8 to fix #65. That way there's no need to simulate events either and it adds an easier to use function.
About Question 2: It is always preferred to use Artemis although in some cases, document.querySelector is used such as the current Play implementation but that's a really specific case. Artemis is actually doing a querySelector on the back so... it's pretty much the same.
I was want to create a PR with more hotkeys for quick buttons, but in order to avoid situation like this i decided to ask several questions.
Current list of hotkeys (seems):
Will be added list of hotkeys:
So, questions:
For example this:
can be changed to this:
So, all the main logic can be placed in the one place instead of kinda copy in various places. I understand that this is architecture question and custom event can perform operations that doesn't related to the main event, but looks like in this situation in can be easily replaced.
${selector} [data-*]
in a pair with Aegis, yes?document.querySelector
and something like this is not allowed?The text was updated successfully, but these errors were encountered: