{"id":458,"date":"2003-07-30T08:50:27","date_gmt":"2003-07-30T08:50:27","guid":{"rendered":"http:\/\/jasonbassford.com\/?p=458"},"modified":"2021-11-12T20:11:58","modified_gmt":"2021-11-13T01:11:58","slug":"its_all_about_c","status":"publish","type":"post","link":"https:\/\/www.jasonbassford.com\/index.php\/2003\/07\/30\/its_all_about_c\/","title":{"rendered":"It&#8217;s all about context."},"content":{"rendered":"<p>Some Web sites use JavaScript to disable the right-mouse button in people&#8217;s browsers.  Their excuse is that they don&#8217;t want anybody to view their source code or download images via the context menu.  Their goal may be understandable, but this kind of &#8220;hijacking&#8221; of somebody&#8217;s browser is regrettable.  I&#8217;m one of those people who thinks that the user should <i>always<\/i> have the last word when it comes to what their browser shows.  (Even if, by so doing, they don&#8217;t display that page the way as it was intended &#8211; so be it, that&#8217;s their choice.)<\/p>\n<p>Bugzilla <a href=\"http:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=86193\">bug 86193<\/a> has been open for a while now on this issue.<\/p>\n<p>Another thing that&#8217;s become noteworthy (from the browser side of things this time) is &#8220;bookmarklets&#8221;.  These are essentially bookmarks, but they call JavaScript code, which means that you don&#8217;t leave the Web site you&#8217;re on but, rather, activate or inactivate some kind of function.  For instance, you can go to a Web site with some annoying Flash animation &#8211; then &#8220;go to&#8221; a bookmarklet which (temporarily) disables the animation  on that page.  One of the best resources for bookmarklets is <a href=\"http:\/\/www.squarefree.com\/\">this<\/a> site created by Jesse Ruderman.<\/p>\n<p>I just found out that he&#8217;s created a bookmarklet that will re-enable the context menu if it&#8217;s been disabled by some site.  So, give it a try.  Grab the <a href=\"javascript:(function() { function R(a){window.addEventListener(a, function (e) { for(var n=e.originalTarget; n; n=n.parentNode) n[\"on\"+a]=null; }, true); window[\"on\"+a]=null; } R(\"contextmenu\"); R(\"click\"); R(\"mousedown\"); R(\"mouseup\"); })()\">&#8220;Restore Context Menu&#8221;<\/a> bookmarklet (appropriately enough, right-click on the link and select &#8220;Bookmark This Page&#8221;).  Then try going to <a href=\"http:\/\/www.dynamicdrive.com\/dynamicindex9\/noright.htm\">this<\/a> site that disables the context menu, and right-click.  Rather than the normal menu you get an alert box telling you the context menu&#8217;s been disabled.  Now, while still at that site, load the bookmark you just saved and try right-clicking again. Presto!  It&#8217;s even easier if you assign it a keyword.  I&#8217;ve used &#8220;!&#8221;, so that&#8217;s all I need to enter as my URL if I want to put things back in context&#8230;<\/p>\n<p><b>Note:<\/b> This particular bookmarklet only works in <a href=\"http:\/\/www.mozillafoundation.org\/\">Mozilla\/Firebird<\/a>.  There are some that work in IE, but not this one.  Then again, why are you using IE anyway?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some Web sites use JavaScript to disable the right-mouse button in people&#8217;s browsers. Their excuse is that they don&#8217;t want anybody to view their source code or download images via the context menu. Their goal may be understandable, but this kind of &#8220;hijacking&#8221; of somebody&#8217;s browser is regrettable. I&#8217;m one of those people who thinks &#8230;<\/p>\n<p><a href=\"https:\/\/www.jasonbassford.com\/index.php\/2003\/07\/30\/its_all_about_c\/\" class=\"more-link\">Continue reading &lsquo;It&#8217;s all about context.&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-458","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/www.jasonbassford.com\/index.php\/wp-json\/wp\/v2\/posts\/458"}],"collection":[{"href":"https:\/\/www.jasonbassford.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jasonbassford.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jasonbassford.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jasonbassford.com\/index.php\/wp-json\/wp\/v2\/comments?post=458"}],"version-history":[{"count":0,"href":"https:\/\/www.jasonbassford.com\/index.php\/wp-json\/wp\/v2\/posts\/458\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jasonbassford.com\/index.php\/wp-json\/wp\/v2\/media?parent=458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jasonbassford.com\/index.php\/wp-json\/wp\/v2\/categories?post=458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jasonbassford.com\/index.php\/wp-json\/wp\/v2\/tags?post=458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}