PageSourceSearch

https://lawandotherthings.com/wp-content/plugins/no-right-click-images-plugin/no-right-click-images.js

js lawandotherthings.com collected 2026-10-02 10:50:13 UTC 2,253 bytes, 85 lines download raw bytes

1/**********************************************
2
3No Right Click Images plugin
4by Keith P. Graham
5
6Plugin URI: http://www.BlogsEye.com/
7Description: Uses Javascript to prevent right clicking of images to help keep leaches from copying images
8Version: 3.4
9Author: Keith P. Graham
10Author URI: http://www.BlogsEye.com/
11
12This software is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
16
17***********************************************/
18	document.addEventListener("contextmenu",kpg_nrci_cm, false);
19	
20	if (nrci_opts['drag']=='Y') {
21		document.addEventListener("dragstart",kpg_nrci_cm, false);
22		document.addEventListener("touchmove",kpg_nrci_cm, false); /* same as drag? */
23	}
24	if (nrci_opts['touch']=='Y') {
25		document.addEventListener("touchstart",kpg_nrci_cm, false);
26	}
27	if (nrci_opts['gesture']=='Y') {
28		document.addEventListener("gesturestart",kpg_nrci_cm, false);
29	}
30
31
32function kpg_nrci_block(event) {
33	event.cancelBubble = true;
34	if(event.preventDefault != undefined) {
35		event.preventDefault();
36	}
37	if(event.stopPropagation != undefined) {
38		event.stopPropagation();
39	}
40	return false;
41}
42function kpg_nrci_cm(event) {
43	try {
44		if (event.target.tagName == "IMG") {
45			//alert("in IMG");
46			event.cancelBubble = true;
47			if(event.preventDefault != undefined) {
48				event.preventDefault();
49			}
50			if(event.stopPropagation != undefined) {
51				event.stopPropagation();
52			}
53			//console.log('in img tag');
54			return false;
55		} 
56	} catch(error) {
57		console.log("NRI error:"+error);
58	}
59
60	try {
61		if(event.target.getAttribute("style")==null || 
62			event.target.getAttribute("style")=="") {
63				return true;
64		}
65		if  (event.target.style.backgroundImage != null 
66			&& event.target.style.backgroundImage != 'none' 
67			&& event.target.style.backgroundImage != '') {
68				event.cancelBubble = true;
69				if(event.preventDefault != undefined) {
70					event.preventDefault();
71				}
72				if(event.stopPropagation != undefined) {
73					event.stopPropagation();
74				}
75				return false;
76		}
77	} catch(error) {
78		console.log("NRI error:"+error);
79	}
80	return true;
81	
82}
83
84	
85

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.