PageSourceSearch

https://lastenkirjainstituutti.fi/2016/wp-content/plugins/wp-galle…/wp-gallery-custom-links.js?ver=1.1

js lastenkirjainstituutti.fi collected 2026-09-24 20:31:18 UTC 1,381 bytes, 49 lines download raw bytes

1jQuery(document).ready(function () {
2	// Unbind on document ready so it will still at least try
3	// to be functional while the page may still be loading
4	wp_gallery_custom_links_setup();
5	
6	// Do unbinding, etc. again in window.onload to help reduce
7	// the number of conflicting lightboxes etc. without
8	// making the user have to declare js dependencies
9	function addLoadEvent(func) {
10		var oldOnload = window.onload;
11		if(typeof window.onload != 'function') {
12			window.onload = func;
13		} else {
14			window.onload = function() {
15				oldOnload();
16				func();
17			}
18		}
19	}
20	addLoadEvent(wp_gallery_custom_links_setup);
21});
22
23function wp_gallery_custom_links_setup() {
24	if(jQuery.fn.off) {
25		// jQuery 1.7+
26		jQuery('.no-lightbox, .no-lightbox img').off('click');
27	} else {
28		// < jQuery 1.7
29		jQuery('.no-lightbox, .no-lightbox img').unbind('click');
30	}
31	jQuery('a.no-lightbox').click(wp_gallery_custom_links_click);
32	
33	if(jQuery.fn.off) {
34		// jQuery 1.7+
35		jQuery('a.set-target').off('click');
36	} else {
37		// < jQuery 1.7
38		jQuery('a.set-target').unbind('click');
39	}
40	jQuery('a.set-target').click(wp_gallery_custom_links_click);
41}
42
43function wp_gallery_custom_links_click() {
44	if(!this.target || this.target == '' || this.target == '_self')
45		window.location = this.href;
46	else
47		window.open(this.href,this.target);
48	return false;
49}

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.