Skip to content

Instantly share code, notes, and snippets.

@bryanbuchanan
Last active December 21, 2015 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bryanbuchanan/6217707 to your computer and use it in GitHub Desktop.
Save bryanbuchanan/6217707 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<!-- Test image -->
<img src="http://m1.22slides.com/bryanbuchanan/4317_image_374612.jpg" alt="Image">
<!-- Load jQuery, which the script is dependent on -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script>
// When the document is fully-downloaded...
$(document).ready(function() {
// ...Place a transparent PNG file ONTOP of any img's on the page, blocking right-click/drag-and-drop saving
$('img').after('<img class="blocker" src="/images/blank.png" alt="" style="position:absolute;top:0;left:0;width:100%;height:100%;max-height:100%;">');
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment