PageSourceSearch

https://flsenate.gov/Scripts/PhotoViewer.js

js flsenate.gov collected 2026-09-24 08:27:08 UTC 2,220 bytes, 58 lines download raw bytes

1$(function(){
2	var defaultValues = {'maxWidth': '800px',
3						 'maxHeight': '800px',
4						 'width': '',
5						 'height': '',
6						 'scrolling' : false};
7
8	// Set default values for maxWidth, maxHeight, width
9	var maxWidth = defaultValues.maxWidth;
10	var maxHeight = defaultValues.maxHeight;
11	var width = defaultValues.width;
12	var height = defaultValues.height;
13	var scrolling = defaultValues.scrolling;
14
15	//Handle case where photo thumbnail is in a clickable rows table
16	DisplayColorbox('.clickableRows tbody tr', 'TableElements', maxWidth, maxHeight, width, height, scrolling);
17
18	//Handle the generic case
19	$('a.photoLink').click(function() {
20	    // Display the popup box
21	    if ($(this).parent().hasClass("colorbox-no-grouping")) {
22	        DisplayColorbox('a.photoLink', false, maxWidth, maxHeight, width, height, scrolling);
23	    } else {
24	        DisplayColorbox('a.photoLink', 'ListElements', maxWidth, maxHeight, width, height, scrolling);
25	    }
26	});
27
28    //Append the title to the colorbox
29	$('a.photoLink').colorbox({
30	    onComplete: function () {
31	        var title = $(this).attr('title');
32	        $("#cboxTitle").remove();  // hide the default title.
33	        $("#cboxLoadedContent").append(title); // Re-append the title and resize.
34	        $.fn.colorbox.resize();
35	    }
36	})
37})
38
39function DisplayColorbox(element, rel, maxWidth, maxHeight, width, height, scrolling)
40{
41    //Commented out because of issue. If there are multiple tables on a page.  Looking for $(element).find('.photoLink') will look for ANY table with a .photolink in the row causing all tables to use lightbox functionality even if it should not.  Using $(this).children() instead
42    // if (($(element).find('.photoLink').length > 0) || (element == 'a.photoLink')) {
43    if (($(this).children().find('.photoLink').length > 0) || (element == 'a.photoLink')) {
44		$(element).colorbox({
45		    transition: 'none',
46		    href: function () {
47		        return $(this).find('.photoLink').attr('href');
48		    },
49			rel: rel,
50			maxWidth: maxWidth,
51			maxHeight: maxHeight,
52            width: width,
53			height: height,
54			scrolling: scrolling
55		});
56		$(element).colorbox.resize();
57	}
58}

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.