If you want to protect the photos on your Tumblr account from being downloaded without your consent, you can disable the right-click functionality for your page, hiding the context menu that allows others to copy or download your pictures. Tumblr allows you to fully customize the HTML and JavaScript code for your current theme. To protect your pictures, add two JavaScript functions to this code, one optimized for Internet Explorer and one for other browsers.

Step 1

Click the name of your Tumblr blog on the dashboard and select "Customize Appearance" to open the appearance settings.

Step 2

Click "Edit HTML" to open the HTML editor for your Tumblr theme. Locate the <head> tag in the code.

Step 3

Add a JavaScript method after the <head> tag to disable the right-click action for users of Internet Explorer. You can use the following code fragment, which verifies the name of the browser and disables the feature by returning false if a user right-clicks on your page or presses the middle mouse button:

function DisableInternetExplorer(e) { if (navigator.appName == "Microsoft Internet Explorer" && (event.button == "2" || event.button == "3")) { return false; } }

Step 4

Add a separate method after the one for Internet Explorer to disable right-clicking in applications such as Firefox, Chrome or Safari. The following code fragment is equivalent to the one in the previous step, but the condition in the If statement is modified to support other browsers:

function DisableOtherBrowsers(e) { if (document.layers || (document.getElementById && !document.all)) { if (e.which == "2" || e.which == "3") { return false; } } }

Step 5

Link the two methods with mouse events in JavaScript, so they are called every time a right-click action is detected. For Internet Explorer, the mouse event for this action is "onmousedown," while for other browsers it is "onmouseup." Add the following two lines to call the methods when these events occur:

document.onmousedown=DisableInternetExplorer; document.onmouseup=DisableOtherBrowsers;

Step 6

Add compatibility for older browsers, such as Internet Explorer 7, for which the right-click event is labeled "oncontextmenu," by appending the following line at the end of your custom code fragment:

document.oncontextmenu=new Function("return false");

Step 7

Click "Update Preview" to preview your page and test the functionality of your code. Select "Save" and click "Close" to save your preferences and close the Tumblr code editor.