揮発性のメモ2

http://d.hatena.ne.jp/iww/

右クリック禁止禁止 7

https://thefunnel.jp/notifications
ここで新しい右クリック禁止方法を知った。

<body onmousemove="window.getSelection().removeAllRanges();">

選択されたそばから解放していくという方法。 ちょっと面白いと思った。

javascript: (function() {
  function unbinder(e) {
    try{ e.oncopy=null; }catch(a){}
    try{ e.onmousedown=null; }catch(a){}
    try{ e.onmousemove=null; }catch(a){}
    try{ e.oncontextmenu=null; }catch(a){}
    try{ e.onselectstart=null; }catch(a){}
    try{ $(e).unbind("contextmenu"); }catch(a){}
    try{ e.style.msUserSelect='auto'; }catch(a){}
    try{ e.style.MozUserSelect='auto'; }catch(a){}
    try{ e.style.webkitUserSelect='auto'; }catch(a){}
  }
  unbinder(document);
  var elist = document.getElementsByTagName("*");
  for(var i = 0; i < elist.length; i++) unbinder(elist[i]);
})();