• The forum software that supports hummy.tv will be upgraded to XenForo 2.3 on Wednesday the 20th of November 2024 starting at 7pm

    There will be some periods where the forum is unavailable, please bear with us. More details can be found in the upgrade thread.

[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
 
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.
 
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
 
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).
 
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.
 
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.
 
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?
 
Back
Top