/dev/adei-asec

To get this branch, use:
bzr branch http://darksoft.org/webbzr/dev/adei-asec

« back to all changes in this revision

Viewing changes to js/client.js

  • Committer: Suren A. Chilingaryan
  • Date: 2011-03-15 02:47:05 UTC
  • mfrom: (210.1.3 adei)
  • Revision ID: csa@dside.dyndns.org-20110315024705-qljn30gwin8yrkne
Integration of work of students with fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
    return (navigator.userAgent.toLowerCase().indexOf("konqueror") > -1) ? true : false;
19
19
}
20
20
 
 
21
function isiDevice() {
 
22
  return (navigator.userAgent.indexOf('iPhone') > -1 || navigator.userAgent.indexOf('iPod') > -1 || navigator.userAgent.indexOf('iPad') > -1 || navigator.userAgent.indexOf('android') > -1) ? true : false;
 
23
}
 
24
function isiPhone() {
 
25
  return (navigator.userAgent.indexOf('iPhone') > -1 || navigator.userAgent.indexOf('iPod')) ? true : false;
 
26
}
 
27
function isiPad(){
 
28
  return (navigator.userAgent.indexOf('iPad') > -1) ? true : false;
 
29
}
 
30
 
 
31
function isSafari() {
 
32
    return (navigator.userAgent.indexOf("Safari") > -1) ? true : false;
 
33
}
 
34
 
21
35
function CLIENT() {
22
36
    this.browser = 0;
23
37
    this.version = 0;
35
49
    return isOpera();
36
50
}
37
51
 
 
52
CLIENT.prototype.isSafari = function() {
 
53
    return isSafari();
 
54
}
 
55
 
38
56
CLIENT.prototype.isKonqueror = function() {
39
57
    return isKonqueror();
40
58
}
 
59
CLIENT.prototype.isiDevice = function() {
 
60
  return isiDevice();
 
61
}
 
62
CLIENT.prototype.isiPhone = function() {
 
63
  return isiPhone();
 
64
}
 
65
CLIENT.prototype.isiPad = function() {
 
66
  return isiPad();
 
67
}
41
68
 
42
69
client = new CLIENT();