OpenCores
URL https://opencores.org/ocsvn/cpu8080/cpu8080/trunk

Subversion Repositories cpu8080

[/] [cpu8080/] [trunk/] [project/] [cpu8080_html/] [fit/] [ns4plugin.js] - Blame information for rev 33

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 samiam9512
 
2
function checkJre(){
3
 
4
var agt=navigator.userAgent.toLowerCase();
5
var is_major = parseInt(navigator.appVersion);
6
 
7
 
8
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')== -1)
9
&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')== -1)
10
&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')== -1));
11
var is_nav4up = (is_nav && (is_major >= 4));
12
 
13
var pluginDetected = false;
14
 
15
// we can check for plugin existence only when browser is 'is_ie5up' or 'is_nav4up'
16
if(is_nav4up) {
17
 
18
  // Refresh 'navigator.plugins' to get newly installed plugins.
19
  // Use 'navigator.plugins.refresh(false)' to refresh plugins 
20
  // without refreshing open documents (browser windows)
21
  if(navigator.plugins) {
22
    navigator.plugins.refresh(false);
23
  }
24
 
25
  // check for Java plugin in installed plugins
26
  if(navigator.mimeTypes) {
27
    // window.alert( navigator.mimeTypes.length); 
28
    for (i=0; i <  navigator.mimeTypes.length; i++) {
29
      // window.alert( navigator.mimeTypes[i].type); 
30
      if( (navigator.mimeTypes[ i].type != null)
31
        &&(navigator.mimeTypes[ i].type.indexOf(
32
        "application/x-java-applet;jpi-version=1.4") != -1) ) {
33
        //window.alert("Found"); 
34
        pluginDetected = true;
35
       break;
36
      }
37
 
38
    }
39
  }
40
 
41
}
42
 
43
if (pluginDetected) {
44
  // show applet page
45
  document.location.href="appletref.htm";
46
 
47
} else if (confirm("Java Plugin 1.4+ not found, Do you want to download it?\n" +
48
                   "if you choose not to install the plugin  the reports graphical applets will not be available.")) {
49
  document.location.href=XilinxD;
50
} else {
51
  document.location.href="appletref.htm";
52
}
53
 
54
}
55
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.