PageSourceSearch

https://www.officesight.com/js/popup/popup.js

js officesight.com collected 2026-10-06 18:38:47 UTC 2,385 bytes, 65 lines download raw bytes

1var Popup = {
2    init:function (url, page) {
3        //default size window
4        var width = 200;
5        var height = 300;
6        var windowId = $("aw_popup_window");
7        new Ajax.Request(url, {
8            method:'get',
9            onSuccess:function (transport) {
10                var json = transport.responseText.evalJSON(true);
11                if (!json.error) {
12                    if (json.width > width) {
13                        width = json.width;
14                    }
15                    if (json.height > height) {
16                        height = json.height;
17                    }
18
19                    // set size window
20                    windowId.style.width = width + 'px';
21                    windowId.style.height = height + 'px';
22                    windowId.style.marginLeft = '-' + (width / 2) + 'px';
23
24                    // set position window
25                    switch (json.align) {
26                        case '2':
27                            windowId.style.marginTop = '-' + (height / 2) + 'px';
28                            windowId.style.top = '50%';
29                            break;
30                        case '3':
31                            windowId.style.marginTop = '-' + ( parseInt(height) + 40) + 'px';
32                            windowId.style.top = '100%';
33                            break;
34                        case '1':
35                        default:
36                            windowId.style.marginTop = '20px';
37                    }
38                    windowId.style.left = '50%';
39                    $('aw_popup_title').innerHTML = json.title;
40                    $('aw_popup_content').innerHTML = json.popup_content;
41
42                    Popup.showWindow();
43
44                    //auto hide
45                    if (json.auto_hide_time) {
46                        setTimeout(function () {
47                            Popup.hideWindow();
48                        }, parseInt(json.auto_hide_time) * 1000);
49                    }
50                }
51            }
52        });
53    },
54
55    showWindow:function () {
56        Effect.Appear($('aw_popup_wraper'), { duration:0.3, from:0.0, to:0.5 });
57        Effect.Appear($('aw_popup_window'), { duration:0.3 });
58    },
59
60    hideWindow:function () {
61        Effect.Fade($('aw_popup_window'), { duration:0.3 });
62        Effect.Fade($('aw_popup_wraper'), { duration:0.3 });
63
64    }
65}

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.