Use JavaScript to disable SELECT & COPY function in WordPress

Watch this video on YouTube


Copy the code below and paste into footer.php file or any particular post(Switch to Text view in Editor and paste in anywhere will works) to disable SELECT & COPY function:

Or write in single line like this:


In order to disable SELECT & the whole RIGHT CLICK menu, use this code below:

 

</catmee> 文章全部原创、谢绝转载,作者「BianLei」,如果喜欢欢迎分享链接,相关内容参见本站版权声明
如果您觉得本站的存在对您多少有所帮助,可以用手机支付宝扫一扫以下二维码支付任意金额作为支持:支付宝
本站相关:QQ空间 | Facebook
Tagged , . Bookmark the permalink.

Dying Light achievement: Homo Homini Lupus Est, where to find survivors and Rais’s men
Dying Light achievement: Homo Homini Lupus Est, where to find survivors and Rais’s men

My 3 days itinerary in Shenzhen: People, places, and first impression
My 3 days itinerary in Shenzhen: People, places, and first impression

How to Cloak Affiliate Links in WordPress without Plugin
How to Cloak Affiliate Links in WordPress without Plugin

Dying Light – How to cheat in Bozak Horde, unlimited challenge timer
Dying Light – How to cheat in Bozak Horde, unlimited challenge timer

Create code highlighter without plugin by use “google-code-prettify” in WordPress
Create code highlighter without plugin by use “google-code-prettify” in WordPress

COMMENTS: 2

  1. Anonymous says:

    I eliminate the “document.onmousedown=killCopy” part so that i can move the slide bar up and down… is this going to affect anything else?

Comment Anonymously? No Problem! | 可以匿名评论了我会说?

Fill up Email address to subscribe reply and display your avatar from Gravatar (If any)
填写邮箱即可显示您在Gravatar的头像