And I'm done. The only real hold-up was trying to figure out the best hook to put this on, and to make sure that I wrote a suitably worded readme file :niark:
(Oh, and while there are some cute scripts out there to do the job, most of the ones I saw briefly in passing do it the old-school way of testing for IE vs NS and expecting anything later to adhere to the NS method, mine however appears to be a bit safer, even if it does use jQuery.)
If you're curious or bored, here's what I came up with.
$("body").bind("contextmenu", function (btn) { return false; }).mousedown(function (btn) { if (btn.which & 2 == 2) { btn.stopImmediatePropagation(); } });
It's compact :)
Any browser not capable of running jQuery is going to have a seriously bad time on the web anyway (we're talking pre IE6 here or fringe browsers no-one has heard of or cares about), so it's not really a problem.
Posted: October 23rd, 2011, 02:52 AM
Also, that's disgraceful, I have to write more lines of code to get that one line into the system than I do the code it adds :/
Posted: October 23rd, 2011, 02:52 AM
In other news, spoiler has a bug, presumably related to a related bug in SMF pre final (that may still be in final) where a 'you have hidden this post' message won't expand properly if it had code in it because the code's size is not reset properly.