News for hackers. Stuff that matters.
Re:Try right clicking GitHub's logo by famousactress on Thursday April 12, 2012 @01:46PM (#3833433)
I find it kind of disarming to overload not-typically-overloaded events like this though. I wonder if it'd be possible to let the right-click menu appear as normal, but background a div that pops up and give you the option of downloading the nicer logo files?
Re:Try right clicking GitHub's logo by soult on Thursday April 12, 2012 @02:12PM (#3833549)
In Firefox you can untick "Allow scripts to Disable or replace context menus" (hidden under Preferences/Content/Enable Javasript/Advanced), which gives exactly the behaviour that you described. I assume other browsers have similar options.
Re:Try right clicking GitHub's logo by oops on Thursday April 12, 2012 @03:09PM (#3833762)
It's not exactly what you suggested, but with HTML5 you can add to the browser's context menu:

http://hacks.mozilla.org/2011/11/html5-context-menus-in-fire... http://www.whatwg.org/specs/web-apps/current-work/multipage/...

Re:Try right clicking GitHub's logo by cannuk on Thursday April 12, 2012 @02:12PM (#3833550)
That should be possible if you do not cancel the event bubble when the overlay is shown. I did not have time to inspect their code, but I assume they are canceling the event.
Re:Try right clicking GitHub's logo by unfletch on Thursday April 12, 2012 @03:42PM (#3833874)
You're thinking of preventing the default action, not stopping propagation. (Event.preventDefault() vs. Event.stopPropagation() in modern browsers.) But you're right, if they handled the right-click and did not explicitly prevent the default action it would do both.