PageSourceSearch

https://8282kc.com/Library/Js/jquery.popupWindow.js

js 8282kc.com collected 2026-10-08 07:39:56 UTC 3,100 bytes, 63 lines download raw bytes

1
2(function($){ 		  
3	$.fn.popupWindow = function(instanceSettings){
4		
5		return this.each(function(){
6		
7		$(this).click(function(){
8		
9		$.fn.popupWindow.defaultSettings = {
10			centerBrowser:0, // center window over browser window? {1 (YES) or 0 (NO)}. overrides top and left
11			centerScreen:0, // center window over entire screen? {1 (YES) or 0 (NO)}. overrides top and left
12			height:500, // sets the height in pixels of the window.
13			left:0, // left position when the window appears.
14			location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}.
15			menubar:0, // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}.
16			resizable:0, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable.
17			scrollbars:0, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}.
18			status:0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}.
19			width:500, // sets the width in pixels of the window.
20			windowName:null, // name of window set from the name attribute of the element that invokes the click
21			windowURL:null, // url used for the popup
22			top:0, // top position when the window appears.
23			toolbar:0 // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}.
24		};
25		
26		settings = $.extend({}, $.fn.popupWindow.defaultSettings, instanceSettings || {});
27		
28		var windowFeatures =    'height=' + settings.height +
29								',width=' + settings.width +
30								',toolbar=' + settings.toolbar +
31								',scrollbars=' + settings.scrollbars +
32								',status=' + settings.status + 
33								',resizable=' + settings.resizable +
34								',location=' + settings.location +
35								',menuBar=' + settings.menubar;
36
37				settings.windowName = this.name || settings.windowName;
38				settings.windowURL = this.href || settings.windowURL;
39				var centeredY,centeredX;
40			
41				if(settings.centerBrowser){
42						
43					if ($.browser.msie) {//hacked together for IE browsers
44						centeredY = (window.screenTop - 120) + ((((document.documentElement.clientHeight + 120)/2) - (settings.height/2)));
45						centeredX = window.screenLeft + ((((document.body.offsetWidth + 20)/2) - (settings.width/2)));
46					}else{
47						centeredY = window.screenY + (((window.outerHeight/2) - (settings.height/2)));
48						centeredX = window.screenX + (((window.outerWidth/2) - (settings.width/2)));
49					}
50					window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY).focus();
51				}else if(settings.centerScreen){
52					centeredY = (screen.height - settings.height)/2;
53					centeredX = (screen.width - settings.width)/2;
54					window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY).focus();
55				}else{
56					window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + settings.left +',top=' + settings.top).focus();	
57				}
58				return false;
59			});
60			
61		});	
62	};
63})(jQuery);

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.