ScriptBlock - Keybinding Topic is solved

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
fatboy
Astronaut
Astronaut
Posts: 556
Joined: 2017-12-19, 08:03
Location: Canada

ScriptBlock - Keybinding

Unread post by fatboy » 2023-05-15, 20:51

Good Day folks,

I am using the pentadactyl and scriptblock addons and was wondering if there is a way to add a keybinding for ScriptBlock, a keybinding that can toggle it on and off?

Something in the lines of?

Code: Select all

emenu.Tools.Add-ons
Thank you
Systemd Free - MX Linux, Antix Linux & Artix Linux

User avatar
jars_
Lunatic
Lunatic
Posts: 397
Joined: 2016-12-27, 00:12

Re: ScriptBlock - Keybinding

Unread post by jars_ » 2023-05-15, 21:47


User avatar
fatboy
Astronaut
Astronaut
Posts: 556
Joined: 2017-12-19, 08:03
Location: Canada

Re: ScriptBlock - Keybinding

Unread post by fatboy » 2023-05-16, 03:47

Good suggestion, but Scriptblocker is not listed as an option, not sure I can bind the addon using the extension
Systemd Free - MX Linux, Antix Linux & Artix Linux

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 932
Joined: 2021-01-26, 11:18

Re: ScriptBlock - Keybinding

Unread post by Kris_88 » 2023-05-16, 04:25

As far as I can see from the sources, the scriptblock cannot be quickly disabled globally (or I'm wrong?). It can only be disabled in the add-on manager with a browser restart. It would be best to add the ability to disable/enable the add-on and at the same time assign a hot key.

User avatar
smithy
Moon lover
Moon lover
Posts: 75
Joined: 2020-07-02, 11:44

Re: ScriptBlock - Keybinding

Unread post by smithy » 2023-05-16, 06:30

Kris_88 wrote:
2023-05-16, 04:25
As far as I can see from the sources, the scriptblock cannot be quickly disabled globally (or I'm wrong?). It can only be disabled in the add-on manager with a browser restart…
You can place the scriptblock icon along side the URL bar. Click on or off on a per site basis. (Default is off)
Is that what you mean by disabled?
It is common to think of our own time as standing at the apex of civilisation from which the deficiencies of preceding ages may patronisingly be viewed in the light of what is assumed to be progress. The reality is that in the long perspective of history the present century will not hold an enviable position unless the second half is to redeem its first.

Chief US prosecutor Robert Jackson's closing statement - Nurenburg 1946

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: ScriptBlock - Keybinding

Unread post by moonbat » 2023-05-16, 08:42

smithy wrote:
2023-05-16, 06:30
You can place the scriptblock icon along side the URL bar. Click on or off on a per site basis. (Default is off)
Is that what you mean by disabled?
No, fatboy is looking for a way to assign a hotkey for doing the same thing.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
jars_
Lunatic
Lunatic
Posts: 397
Joined: 2016-12-27, 00:12

Re: ScriptBlock - Keybinding

Unread post by jars_ » 2023-05-16, 08:57

For Scriptblock hotkey action:

Code: Select all

yesScriptBrowserOverlay.toggle();

User avatar
fatboy
Astronaut
Astronaut
Posts: 556
Joined: 2017-12-19, 08:03
Location: Canada

Re: ScriptBlock - Keybinding

Unread post by fatboy » 2023-05-16, 15:44

moonbat wrote:
2023-05-16, 08:42
No, fatboy is looking for a way to assign a hotkey for doing the same thing.
This is exactly what I am looking for. I want to toggle the ScriptBlock Extension with a hotkey, as opposed to clicking on it. I want to use the keyboard as much as possible
Systemd Free - MX Linux, Antix Linux & Artix Linux

User avatar
fatboy
Astronaut
Astronaut
Posts: 556
Joined: 2017-12-19, 08:03
Location: Canada

Re: ScriptBlock - Keybinding

Unread post by fatboy » 2023-05-16, 15:54

Awesome! I have found a solution, thanks to jars_!

Here it is, Control + j will toggle it on and off

Code: Select all

map <C-j> :execute yesScriptBrowserOverlay.toggle(setStyleDisabled);<CR>
Systemd Free - MX Linux, Antix Linux & Artix Linux

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 932
Joined: 2021-01-26, 11:18

Re: ScriptBlock - Keybinding

Unread post by Kris_88 » 2023-05-16, 16:12

For some reason, I thought that you want to turn on/off its functionality completely ...

Locked