Changing default Right Click Warning Message

SloYerRollSloYerRoll Registered Users Posts: 2,788 Major grins
edited September 25, 2007 in SmugMug Pro Sales Support
I know this is easy.
Ive added a right click warning message in my JS. And it doesn't protect my galleries. (example here)
I can go into the control panel and protect them. But the verbage isn't what I want to use.

Any ideas on where i goofed this up?


I'll stop screwing w/ it for a bit so we don't cross paths.

Thanks,
-Jon

Comments

  • dhlewisdhlewis Registered Users Posts: 145 Major grins
    edited September 25, 2007
    SloYerRoll wrote:
    I know this is easy.
    Ive added a right click warning message in my JS. And it doesn't protect my galleries. (example here)
    I can go into the control panel and protect them. But the verbage isn't what I want to use.

    Any ideas on where i goofed this up?


    I'll stop screwing w/ it for a bit so we don't cross paths.

    Thanks,
    -Jon

    this is what I use, put into javascript


    /*============================*/
    /*== Right Click Protect ==*/
    /*============================*/
    <!--
    document.oncontextmenu = rightProtect;
    function rightProtect(e) {
    if (window.event) {
    var srcEl = event.srcElement ? event.srcElement : event.target;
    }
    else {
    var srcEl = e.srcElement ? e.srcElement : e.target;
    }
    if (srcEl.tagName.toLowerCase() == 'img') {
    window.alert(rightClickWarning);
    return false;
    }
    else {
    return true;
    }
    }
    var rightClickWarning = "You can purchase this image file by clicking the Buy button above.";
    //-->
    ______________________________________________________________
    1D MarkIII, 16-35L, 28-70L, 70-200f2.8L, 50 f1.4, 300/f2.8L 1.4xL, 2XIIL (2)580EX, supporting cast of other stuff

    dale@dhlewisphotography.com
    http://dhlewisphotography.com
  • SloYerRollSloYerRoll Registered Users Posts: 2,788 Major grins
    edited September 25, 2007
    That's a heckuva lot more JS than I had in my script. Works like a champ though!

    Thanks DH!

    -Jon
  • RogersDARogersDA Registered Users Posts: 3,502 Major grins
    edited September 25, 2007
    SloYerRoll wrote:
    That's a heckuva lot more JS than I had in my script. Works like a champ though!

    Thanks DH!

    -Jon
    Easier to just add this to your JS:
    [FONT=Courier New]/*==================================================*/
    /* Provide the Copyright Notice When Right-Clicking */
    /* =================================================*/
    rightClickWarning = "Your favorite © text here."[/FONT]
    
Sign In or Register to comment.