PageSourceSearch

https://harbourcafehk.com/javascripts/plugins/jquery.asterion.utils.ui.js?1790610244

js harbourcafehk.com collected 2026-10-04 23:30:01 UTC 1,258 bytes, 32 lines download raw bytes

1/**
2 * This library contains some libraries which user user-interface related.
3 */
4
5(function($) {
6	
7    // build a namespace
8    $.asterion = $.asterion || {};
9	$.asterion.utils = $.asterion.utils || {};
10	$.asterion.utils.ui = {};
11	
12	/**
13	 * Performs <code>window.open</code> but which centers the window
14	 * 
15	 * @param {String} url the URL to open in the new window
16	 * @param {String} title the identifying title/name of the window
17	 * @param {Number} width the width of the new window
18	 * @param {Number} height the height of the new window
19	 * @returns {Window}
20	 */
21	$.asterion.utils.ui.PopupCenter = function(url, title, width, height, options) {
22		var dualScreenLeft = window.screenLeft || screen.left;
23		var dualScreenTop = window.screenTop || screen.top;
24		var dualScreenWidth = window.innerWidth || document.documentElement.clientWidth || screen.width;
25		var dualScreenHeight = window.innerHeight || document.documentElement.clientHeight || screen.height;
26		var left = ((dualScreenWidth - width) / 2) + dualScreenLeft;
27		var top = ((dualScreenHeight - height) / 2) + dualScreenTop;
28		
29		return window.open(url, title, (options ? options + ',' : '') + ['width=' + width, 'height=' + height, 'left=' + left, 'top=' + top].join());
30	};
31	
32})(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.