Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change action of 'Save Image As' to redirect to appropriate webpage

I am looking for a way to change the behavior of 'Save Image As' when people try to download the small logo files from my website. I don't mind them using my logo, but I would prefer that the get the one from my actual downloads page so it is good quality.

Ideally I would like to be able to set a css class up so I can apply the behavior to specific images. I don't need it to be on every image on the site.

like image 801
user3003324 Avatar asked Feb 01 '26 11:02

user3003324


1 Answers

when someone visit your website, images are downloaded and saved in the cache folder.

but you can disable Right Click mouse on your site to prevent people to Save Image:

<script>
    document.onmousedown=disableclick;
    status="Right Click Disabled";
    function disableclick(event)
    {
      if(event.button==2)
       {
         alert(status);
         return false;    
       }
    }
</script>

but remember people still can access to your logo. but harder.

document.onmousedown=disableclick;
status="Right Click Disabled";
function disableclick(event)
{
  if(event.button==2)
  {
    alert(status);
    return false;    
  }
}
<p>some thing</p>
like image 151
Farhad Avatar answered Feb 03 '26 03:02

Farhad