<!--画像のみ右クリ禁止-->
<script type="text/javascript">
jQuery(function(){
jQuery("img").on("contextmenu",function(){
return false;
});
});
</script>
/* 長押しアクションを禁止 */
img{
-webkit-touch-callout:none;
-webkit-user-select:none;
-moz-touch-callout:none;
-moz-user-select:none;
touch-callout:none;
user-select:none;
}
/* マウスイベントの制御 */
.single .entry-content img{
pointer-events: none;
}
マウスイベントを制御する pointer-events: none; を全部のimgにかけると、
・画像リンク無効
・なぜか右クリ禁止が解ける
となった。
そのため、PCでは全面的に使えない、スマホではsingleページのcontent部分のみに対応することにした。
長押しアクション禁止cssでAndroidが効かないのがすべて悪い
あーくそめんどくせえ
効くようにしてくれや
これでも何かダメだったら「
dwImageProtector Plugin」のjqueryプラグインを使用する
透明gifを画像の上にのっけて、通常の画像保存すると透明gifが保存されてしまう仕組み