PageRenderTime 145ms CodeModel.GetById 135ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/builder/boilerplate/home.nocache.html

http://pyjamas.googlecode.com/
HTML | 79 lines | 73 code | 6 blank | 0 comment | 0 complexity | 20c8634000af2acc32e02b3b21717459 MD5 | raw file
 1<html><head><script>
 2
 3window["provider$user.agent"] = function() {
 4  var ua = navigator.userAgent.toLowerCase();
 5  if (ua.indexOf('opera') != -1) {
 6    return 'opera';
 7  }
 8   else if (ua.indexOf('safari') != -1) {
 9    return 'safari';
10  }
11   else if (ua.indexOf('msie 6.0') != -1) {
12    return 'ie6';
13  }
14   else if (ua.indexOf('msie 7.0') != -1) {
15    return 'ie6';
16  }
17   else if (ua.indexOf('mozilla') != -1) {
18    var geckoIdx = ua.indexOf('gecko/');
19    if (geckoIdx == -1) 
20      return 'oldmoz';
21    var spaceIdx = ua.indexOf(' ', geckoIdx);
22    if (spaceIdx == -1) 
23      spaceIdx = ua.length;
24    var version = parseInt(ua.substring(geckoIdx + 6, spaceIdx));
25    if (version < 20051107) 
26      return 'oldmoz';
27    return 'moz';
28  }
29  return 'unknown';
30}
31;
32
33window["prop$user.agent"] = function() {
34  var v = window["provider$user.agent"]();
35  switch (v) {
36    case "ie6":
37    case "moz":
38    case "oldmoz":
39    case "opera":
40    case "safari":
41      return v;
42    default:
43      parent.__pygwt_onBadProperty("%(app_name)s", "user.agent", ['"ie6"', '"moz"', '"oldmoz"', '"opera"', '"safari"'], v);
44      throw null;
45  }
46};
47
48function O(a,v) {
49  var answer = O.answers;
50  var i = -1;
51  var n = a.length - 1;
52  while (++i < n) {
53    if (!(a[i] in answer)) {
54      answer[a[i]] = [];
55    }
56    answer = answer[a[i]];
57  }
58  answer[a[n]] = v;
59}
60O.answers = [];
61
62function selectScript() {
63  try {
64    var F;
65    var I = ["true", (F=window["prop$user.agent"],F())];
66
67    O(["true","safari"],"%(safari_js)s");
68    O(["true","ie6"],"%(ie6_js)s");
69    O(["true","oldmoz"],"%(oldmoz_js)s");
70    O(["true","moz"],"%(moz_js)s");
71    O(["true","opera"],"%(opera_js)s");
72
73    var strongName = O.answers[I[0]][I[1]];
74    location.replace(strongName + '.cache.html');
75  } catch (e) {
76    // intentionally silent on property failure
77  }
78}
79</script></head><body onload='if (parent && parent.__pygwt_webModeFrameOnLoad) selectScript()'><font face='arial' size='-1'>This script is part of module</font> <code>%(app_name)s</code></body></html>