• The forum software that supports hummy.tv has been upgraded to XenForo 2.1!

    This upgrade brings a number of improvements including the ability to bookmark posts to come back to later. Please bear with us as we continue to tweak things and open a new thread for any questions, issues or suggestions in Site/Forum Issues.

[RS]Make buttons clickable with mouse middle button?

Dave F.

Member
Hi

Would it be possible to make RS buttons clickable with mouse middle button so they open the page in a new tab? I've tried in on both FireFox & Chrome but they default to the mouse pan command.

1570452628817.png
 

Black Hole

May contain traces of nut
First question is whether middle-click is a supported action in web pages. Only if there is a communications mechanism that allows the client-side to communicate the action to the server-side would it be possible at all. Neither am I sure it is possible to specify "open in new tab" in HTML - you might be restricted to "open in new window".

I can well believe that specific browsers would implement middle-click actions locally, but that's proprietary and no communication with the server is involved. You could investigate whether a specific browser has user preferences that can set middle-click to "open in new tab" as a universal local action.
 

MymsMan

Ad detector
Unlike the webif the RS does not support the normal Ctrl/Shift+left-click to open in a new Tab/Window so its not surprising that it doesn't recognize the less common middle button
 

Black Hole

May contain traces of nut
Unlike the webif the RS does not support the normal Ctrl/Shift+left-click to open in a new Tab/Window
The RS does on some links but not on others. I'm no expert, but I think this depends on whether the link/button is just normal HTML (in which case the link can specify opening in a new window by default, or the browser can decide to open in a new window according to specific user actions such as holding shift), implemented in Javascript (in which case the design can choose to do just about anything, including detect the middle button and act accordingly), or implemented in server-side scripting (such as Jim, in which case the actions are limited by the information which can be returned to the script by the browser).
 
OP
Dave F.

Dave F.

Member
The 'more' button in RS duplicates the page in new tab on a middle button press, so it appears to be utilized.
Webif's 'opt' button is triggered by a middle click.
 

Black Hole

May contain traces of nut
Right, so it looks possible. Which buttons do you want to have optional new-window functionality?

Incidentally: on iPadOS Safari, although there is an "open in new tab" option, that doesn't bring up the More menu - it only opens another instance of the same page.
 

MymsMan

Ad detector
Right, so it looks possible. Which buttons do you want to have optional new-window functionality?
Unfortunately, unlike the webif which is served from the Humax and where we can tinker without affecting anyone else, the RS is served from the rs.hpkg.tv web server which only @af123 can touch so it isn't something you can easily experiment with (though the changes should be quite simple)

The question is why did he originally implement the page switches in functions rather than coding the URL.s directly on the <button> tags which would have been simpler and less coding.
Nothing else is being done in the functions so was there some other reason for inhibiting muliple RS windows and is it still valid?
 
Top