Not logged in. · Lost password · Register
Forum: General Help and Support Plugins Plugin Wishlist RSS
i have some problem.
how can i ban the copy(the crtl+c or the mouse right )on the front page
pro_Kong #1
Member since Nov 2016 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: i have some problem.
i have some can i ban the copy(use the crtl+c or the mouse right )on the front page?waiting for answer
User title: Scott Ferguson
Member since Dec 2014 · 463 posts · Location: Canberra, Australia
Group memberships: Members
Show profile · Link to this post
To do that only on the front page you could use the inlineJS plugin and the following code:-
jQuery(document).bind("contextmenu", function (e) {                                                     
        alert("To copy the content of this page:-\n\tSave page\n\tPrint page\n\tprint screen\n\tuse wget or CURL\n\thighlight content and press Ctrl+c\n\tView source and download images using direct links\n\nTo re-enable right click - copy and paste into the URL bar:-\njavascript:void(document.oncontextmenu=null);");                                                            

Important - using that plugin is a potential security risk.

Note also that disabling right-click does not stop people copying your web page.

To disable right-click for the entire DokuWiki, without the same risks as using the plugin - put that code into $DokuWiki/conf/userscript.js

Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-08-24, 02:26:20 (UTC +02:00)