How do I disable my mouse's "back" button for a single Firefox tab?

5

2

Sometimes, accidentally hitting my back button can be a huge pain. For instance, on Mibbit.com, if I hit that button I will have to re-logon to IRC. Probably the easiest choice would be a Firefox extension so I can just click a button to clear the history for the current tab, but I haven't seen anything like this.

Sam Jones

Posted 2009-08-05T13:37:37.097

Reputation: 203

4You could just open everything you don't want to go back from in a new tab so you won't have a history to begin with :-) – Joey – 2009-08-05T13:45:09.230

Maybe some greasemonkey script can do that. – MicTech – 2009-08-05T13:47:32.223

Johannes, I would do the new tab way, but at least in Mibbit's case the action to get to my final page is JavaScript - no new-tabbing.

MicTech, I might have to take this as an opportunity to learn greasemonkey scripting if I don't find anything premade. – Sam Jones – 2009-08-05T13:50:39.910

Answers

3

Im not sure if AutoHotKey has support for the back button on your mouse, but it can gobble up a mouse button press based on the text in the title bar of the active window.

http://www.autohotkey.com/docs/commands/_IfWinActive.htm

Kells

Posted 2009-08-05T13:37:37.097

Reputation: 1 008

This looks like it has promise. I'll try to give it a shot today. – Sam Jones – 2009-08-06T14:06:22.817

Worked perfectly! My mouse's back/forward buttons are now remapped to do nothing when I'm in one of these problem tabs. Thank you! – Sam Jones – 2009-08-07T13:17:35.200

2

Try using the Firefox plug-in "Tab Mix Plus". It has the ability to configure how the tabs behave. This program also has the ability to open closed tabs which might also get you back into the website you inadvertently backed out of. It allows you to set the default tab behavior as well. This plug-in should do what you are looking to do.

Tab Mix Plus

Axxmasterr

Posted 2009-08-05T13:37:37.097

Reputation: 7 584

I started looking into this, and the "lock tab" functionality looks like it would do what I need, but in practice it isn't changing the back/forward behavior at all. I'm still rooting through their forum to make sure I understand it correctly, but right now it's not solving the issue. – Sam Jones – 2009-08-05T14:27:28.947

2

Autohotkey is a Windows solution. I came to this webpage searching for a Unix solution to the same problem. Eventually I found this solution: installing xinput and putting

xinput set-button-map "Trackpad" 1 2 3 4 5 6 7 0 0

into my ~/.xsession. This was the link that helped me.

dubiousjim

Posted 2009-08-05T13:37:37.097

Reputation: 1 128

Thanks! At first I thought my mouse was broken and firefox gestures were involved, but exactly those extra buttons were the problem this time! Disabled them and it works like charm!

– Matija Nalis – 2017-08-17T14:09:50.027

I've had to put it in /etc/X11/xorg.conf.d/ to be permanent over reboots and suspend/resume, as detailed here

– Matija Nalis – 2017-08-21T20:48:06.433

0

Perhaps you can script something to do this:

How to Disable the Browser Back Button

Its quite simple to disable the back button functionality of a browser (this was tested on IE and Firefox). This causes every back to return with a forward. Works a treat ;o)

if (window.history) {
> window.history.forward(1); }

or

function noBack(){window.history.forward()}
noBack();
window.onload=noBack;
window.onpageshow=function(evt){if(evt.persisted)noBack()}
window.onunload=function(){void(0)}

Ivo Flipse

Posted 2009-08-05T13:37:37.097

Reputation: 24 054

This is for third party websites, not the OP's own website. – Sam Hasler – 2009-08-06T19:56:51.037