Open ShalokShalom opened 7 years ago
Hi @ShalokShalom!
I just tested this on Opera 45.0.2552.898 (PGO) on a Windows 10 64-bit system and the shortcuts are working for me.
From your other issue I'm guessing you see this issue in Opera for KaOS? With two reported issues, I'm wondering if the userscript manager is working as expected?
Is this still an issue?
It works now, while g- does also disable the dark theme at all now. Same thing in Firefox, while it does not zoom even there.
Sorry for the delay in followup... would you please elaborate on what this means:
Same thing in Firefox, while it does not zoom even there.
I don't know what you mean about it not zooming?
If everything works, can I close this issue?
In Firefox, g- disables the theme, while your wiki means, its supposed to enable the settings menu: https://github.com/StylishThemes/GitHub-Dark-Script/wiki#enable-github-dark
Same thing in Opera, while it zooms out there as well. So Page zoom out plus disablement of the Script, instead of an access to the settings.
I can not duplicate what you're describing... are only the g and - keys being pressed – separately but within one second of each other? Are you using the keypad - or the one in the number row? It shouldn't matter, but I'm asking just in case.
The only way I get the zoom to work is if I hold down the Ctrl key (Windows).
within one second of each other and the number row, possible just on Linux
Would you try editing the userscript and try some different key combinations?
Look at lines 36-37 and modify them as desired:
// Keyboard shortcut to open ghd panel (only a two key combo coded)
keyboardOpen = "g+0",
keyboardToggle = "g+-",
It's not set up to allow you to enter stuff like "ctrl+F1", just single letters and numbers.
If it isn't the keys themselves, maybe it is because the script is bound to the document
(see line 973) and listening for "keypress" and "keydown"... Maybe try switching that to document.body
and see if that fixes the problem.
on(document.body, "keypress keydown", event => {
Sorry I can't be of more help... I don't have any systems running Linux to test these changes.
I changed it to g+b and g+f and it doesnt do anything on Grease at Firefox now:
Sorry for not getting back to you on this issue. It sounds like Linux is interfering with the script. I don't have any way to troubleshoot and solve this problem.
And now? I also set document.body
I was trying to ask that if you're still using this script, are you able to troubleshoot the event listener?
Are the "keypress" or "keydown" events firing? I just updated the script to check the event.key
instead of processing event.which
. Maybe that will fix the issue? If not, would you please add a console.log
after the changed line to see what key is being reported?
I use the current Github version 2.2.7 and its still happening. Can you give me a specific command? Under which specific line?
NOTE: As stated: g/- as an example work, in the wa that it triggers the Script on and off. The zoom out happens additionally.
And what happens when you switch the keys to "g+b" and "g+f"?
Shortcurts like "Press g, then 0/- within one second of each other." make the zoom larger/smaller here in Opera.