Need Help With Middle Click Fuction.

I have a custom button add-on for Firefox that will go to Facebook in the currently viewing tab and would like to add middle click to open Facebook in a new tab but im not sure how. I looked around and found that I need to use the if (event.button == 4) {...} & but im not sure where to put them to get it to work.
Here is the current JS code.

[code]CustomButton = {

1: function () {const url = ""

.loadURI(url, 0, null, null, null)


Thanks for any help and guidance.
Note: If you see anything else wrong with the code, feel free to mention it.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!