AvacWeb
  • HomeHome  
  • SearchSearch  

    Search Query


    Display results as :


    Advanced Search Advanced Search

  • MemberlistMemberlist  
  • RegisterRegister  
  • AWC  
  • Log inLog in  

Topics

    Users

      Posts

        NEW AWC 2.1 UPDATE IS HERE | Get it here!
        (150px x 30px Banner)
        #tutorial #LGBB #tips #OST #AWC
        Trending Hashtags

        The most tagged members


        Page 1 of 1 • 

        Disable Right Click script vs AWC

        GuestGuest
        Guest
        Post #23243
        on 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?
        Thank Poster
        avatarBloodbath
        Bloodbath
        Status : No status yet...

        Posts : 745
        Join date : 2013-05-31
        Age : 22
        Post #23244
        on 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.
        Thank Poster
        GuestGuest
        Guest
        Post #23245
        on 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.
        Thank Poster
        GuestGuest
        Guest
        Post #23249
        on Sun 31 May 2015, 21:56
        Solution:

        Code:
        [panda=html]<HEAD>
        <script language=Javascript1.2> function ejs_nodroit() { } document.oncontextmenu = ejs_nodroit;</script>
        </HEAD>
        Thank Poster

        The author of this message was banned from the forum - See the message

        avatarMr.Easybb
        Mr.Easybb
        Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

        Posts : 1592
        Join date : 2013-01-04
        Post #23438
        on 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");
            });
        Thank Poster
        Sponsored contentSponsored content
        Post #0
        Thank Poster

        Previous Topic • Next Topic

        Copyright © Avacweb 2011 -

        Free forum | © phpBB | Free forum support | Contact | Report an abuse | Free forum