PageSourceSearch

http://www.audio160.com/js/skypeCheck.js

js audio160.com collected 2026-10-07 23:51:52 UTC 2,862 bytes, 73 lines download raw bytes

1var activex = ((navigator.userAgent.indexOf('Win')  != -1) && (navigator.userAgent.indexOf('MSIE') != -1) && (parseInt(navigator.appVersion) >= 4 ));
2var CantDetect = ((navigator.userAgent.indexOf('Safari')  != -1) || (navigator.userAgent.indexOf('Opera')  != -1));
3
4function oopsPopup() {
5    if((navigator.language && navigator.language.indexOf("ja") != -1) || (navigator.systemLanguage && navigator.systemLanguage.indexOf("ja") != -1) || (navigator.userLanguage && navigator.userLanguage.indexOf("ja") != -1)) {
6        var URLtoOpen = "http://download.skype.com/share/skypebuttons/oops/oops_ja.html";
7    } else {
8        var URLtoOpen = "http://download.skype.com/share/skypebuttons/oops/oops.html";
9    }
10	var windowName = "oops";
11	var popW = 540, popH = 305;
12	var scrollB = 'no';
13	w = screen.availWidth;
14	h = screen.availHeight;
15	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
16	oopswindow = window.open(URLtoOpen, windowName,'width=' + popW + ',height=' + popH + ',scrollbars=' + scrollB + ',screenx=' +leftPos +',screeny=' +topPos +',top=' +topPos +',left=' +leftPos);
17	return false;
18}
19
20if(typeof(detected) == "undefined" && activex) {
21    document.write(
22        ['<script language="VBscript">',
23        'Function isSkypeInstalled()',
24        'on error resume next',
25        'Set oSkype = CreateObject("Skype.Detection")',
26        'isSkypeInstalled = IsObject(oSkype)',
27        'Set oSkype = nothing',
28        'End Function',
29        '</script>'].join("\n")
30    );
31}
32
33function skypeCheck() {
34    if(CantDetect) {
35        return true;
36    } else if(!activex) {
37        var skypeMime = navigator.mimeTypes["application/x-skype"];
38        detected = true;
39        if(typeof(skypeMime) == "object") {
40            return true;
41        } else {
42            return oopsPopup();
43        }
44    } else {
45        if(isSkypeInstalled()) {
46            detected = true;
47            return true;
48        }
49    }
50    
51    detected = true;
52    return oopsPopup();
53}
54
55function loadDetection() {
56    if(document.getElementById && document.getElementsByTagName) {
57        if (window.addEventListener) window.addEventListener('load', addDetection, false);
58        else if (window.attachEvent) window.attachEvent('onload', addDetection);
59    }
60}
61
62function addDetection() {
63    var pageLinks = document.getElementsByTagName("a");
64    for (var i=0; i < pageLinks.length; i++) {
65        if(pageLinks[i].childNodes[0] && pageLinks[i].childNodes[0].src) {
66            if((pageLinks[i].childNodes[0].src.indexOf('download.skype.com\/share\/skypebuttons') != -1 || pageLinks[i].childNodes[0].src.indexOf('mystatus.skype.com') != -1) && (typeof(pageLinks[i].onclick) == "undefined" || pageLinks[i].onclick == null)) {
67                pageLinks[i].onclick = function sChk() { return skypeCheck(); }
68            }
69        }
70    }
71}
72
73loadDetection();

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.