Like SystemiConnectFri 15 Oct 2021, 04:50
Auto Save MessagesLGforumFri 26 Feb 2021, 13:31
New tutorial questionTheCrowMon 15 Feb 2021, 08:12
Support iOS Emojis (and other platforms)LGforumSun 14 Feb 2021, 01:25
LGforum (2806)
Disable Right Click script vs AWC Vote_lcapDisable Right Click script vs AWC Voting_barDisable Right Click script vs AWC Vote_rcap 
Mr.Easybb (1587)
Disable Right Click script vs AWC Vote_lcapDisable Right Click script vs AWC Voting_barDisable Right Click script vs AWC Vote_rcap 
Bloodbath (745)
Disable Right Click script vs AWC Vote_lcapDisable Right Click script vs AWC Voting_barDisable Right Click script vs AWC Vote_rcap 
Rukiafan (533)
Disable Right Click script vs AWC Vote_lcapDisable Right Click script vs AWC Voting_barDisable Right Click script vs AWC Vote_rcap 
Dom (513)
Disable Right Click script vs AWC Vote_lcapDisable Right Click script vs AWC Voting_barDisable Right Click script vs AWC Vote_rcap 
puppycheese (446)
Disable Right Click script vs AWC Vote_lcapDisable Right Click script vs AWC Voting_barDisable Right Click script vs AWC Vote_rcap 
pedro (330)
Disable Right Click script vs AWC Vote_lcapDisable Right Click script vs AWC Voting_barDisable Right Click script vs AWC Vote_rcap 
Neymar (301)
Disable Right Click script vs AWC Vote_lcapDisable Right Click script vs AWC Voting_barDisable Right Click script vs AWC Vote_rcap 
Hitsu (281)
Disable Right Click script vs AWC Vote_lcapDisable Right Click script vs AWC Voting_barDisable Right Click script vs AWC Vote_rcap 
Flora (275)
Disable Right Click script vs AWC Vote_lcapDisable Right Click script vs AWC Voting_barDisable Right Click script vs AWC Vote_rcap 


Disable Right Click script vs AWC

avatarGuest
Thu 28 May 2015, 13:52
I've got a question. I want to introduce a disable right click script in the site description on my forum. This is the command line to be executed:

Code:
<script language=Javascript1.2> function ejs_nodroit() { alert('©FriendCodes 2014 - 2015');return(false); } document.oncontextmenu = ejs_nodroit;</script>

Now the problem is this is gonna be run on my AWC custom placement (using header & footer) HTML page as well and as my request swapping right and left clicks in AWC hasn't been worked on yet, meanwhile, how can I prevent execution of that line in my AWC HTML?
BloodbathBloodbath
Status : No status yet...

Posts : 745
Join date : 2013-05-31
Age : 28
Thu 28 May 2015, 17:13
Well, we'll have to consider: first, why you would even disallow right-clicking; second, we can simply override the handler later on with the avacweb_chat_config.add_event method.
avatarGuest
Thu 28 May 2015, 17:50
Well, either that or better still: straight up write me the swap right and left click stuff for AWC. The consideration was all mine before, mind you. Thanks for understanding.

EDIT May 29 19:53 CET: This one got solved by another support forum already. I still need that shift left and right click script tho.
avatarGuest
Sun 31 May 2015, 21:56
Solution:

Code:
[panda=html]<HEAD>
<script language=Javascript1.2> function ejs_nodroit() { } document.oncontextmenu = ejs_nodroit;</script>
</HEAD>
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Wed 29 Jul 2015, 00:24
that script seems foolish to say the least. A simple preventDefault would work.

Code:
[panda=js]
    document.addEventListener("contextmenu",function(e){
        e.preventDefault();
        console.log("Right Click Prevented");
    });
Sponsored content