// ==UserScript==
// @name            Enable Context Menu
// @description     Restore context menus on specific sites that try to disable them
// @namespace       http://www.orbona.com/greasemonkey/
// @include         http://nailgal.com/*
// @include         http://www.nailgal.com/*
// @include         http://marvel.com/*
// @include         http://www.marvel.com/*

// ==/UserScript==

function doIt() {
   unsafeWindow.document.onmousedown = null;
   unsafeWindow.onmousedown = null;
   unsafeWindow.document.oncontextmenu = null;
   unsafeWindow.oncontextmenu = null;

   if (document.all)  {
      allElemsCount = document.all.length;

      for (var i = 0;i < allElemsCount;i++) {
         document.all[i].setAttribute("oncontextmenu", "return true;");
         document.all[i].setAttribute("onmousedown", "return true;");
         document.all[i].setAttribute("onmouseup", "return true;");
      }
   }
   else   {
      allElems = document.getElementsByTagName('*');
      allElemsCount = allElems.length;

      for (var i = 0;i < allElemsCount;i++) {
         allElems[i].setAttribute("oncontextmenu", "return true;");
         allElems[i].setAttribute("onmousedown", "return true;");
         allElems[i].setAttribute("onmouseup", "return true;");
      }
   }
}

window.addEventListener("load", function() { doIt(); }, false);
