Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-122: For unsupported browsers, there is now a redirect to a static and self-contained page with a warning message. Clicking on Continue anyway allows the user to continue to a possibly broken Worldview.

Mike McGann719cc1641083
diff --git a/html/unsupported_browser.html b/html/unsupported_browser.html
new file mode 100644
index 000000000..251cf3dc3
--- /dev/null
+++ b/html/unsupported_browser.html
@@ -0,0 +1,66 @@
+<!doctype html>
+<html>
+<head>
+ <title>EOSDIS Worldview (Alpha)</title>
+ <style>
+ body {
+ background-color: black;
+ }
+
+ #unsupported {
+ position: fixed;
+ width: 500px;
+ height: 300px;
+ left: 50%;
+ top: 50%;
+ margin-left: -250px;
+ margin-top: -150px;
+ padding: 20px;
+ background-color: #ffffee;
+ border: 1px solid: #ffffff;
+ }
+
+ h4 {
+ text-align: center;
+ }
+
+ #continue {
+ font-size: 14pt;
+ text-align: center;
+ }
+
+ </style>
+
+ <script>
+ window.onload = function() {
+ var link = document.getElementById("continue");
+ if ( location.search.length == 0 ) {
+ link.href = "../index.html?unsupported"
+ } else {
+ link.href = "../index.html" + location.search + "&unsupported";
+ }
+ }
+ </script>
+</head>
+<body>
+ <img src="../images/logo.png">
+ <div id="unsupported">
+ <h4>Internet Explorer is not currently supported</h4>
+ <p>
+ Worldview uses a set of browser technologies that are not currently
+ supported by Internet Explorer. We are awaiting the release of IE version
+ 10 and are hopeful that it will load Worldview properly. In the meantime,
+ please try loading this page in Mozilla Firefox, Google Chrome, Apple
+ Safari, or a tablet device.
+ </p>
+ <p>
+ Thanks for your patience.
+ </p>
+ <p>
+ -The Worldview development team
+ </p>
+ <h4>
+ <a id="continue">Continue anyway</a>
+ </h4>
+ </div>
+</body>
\ No newline at end of file
diff --git a/index.html b/index.html
index b15e41d0d..112186228 100644
--- a/index.html
+++ b/index.html
@@ -2,6 +2,12 @@
<head>
<title>EOSDIS Worldview (Alpha)</title>
+ <script type="text/javascript">
+ if ( /MSIE (\d+\.\d+);/.test(navigator.userAgent) && ! /unsupported/.test(location.search) ) {
+ document.location.replace("html/unsupported_browser.html" + location.search);
+ }
+ </script>
+
<!-- meta defines -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
diff --git a/js/Worldview.js b/js/Worldview.js
index 7eff65c8d..2dab168cb 100644
--- a/js/Worldview.js
+++ b/js/Worldview.js
@@ -18,4 +18,3 @@
})(window.Worldview = window.Worldview || {});
-
diff --git a/js/main.js b/js/main.js
index 3c35c75a5..245cdd28f 100644
--- a/js/main.js
+++ b/js/main.js
@@ -1,40 +1,25 @@
window.onload = function(){// Initialize "static" vars
- // Test for IE and show warning, if necessary
- if (/MSIE (\d+\.\d+);/.test(navigator.userAgent))
- {
- var ieWarningOverlay = new YAHOO.widget.Panel("iewarning", { zIndex:1020, visible:false, underlay:"matte" } );
- var msg = "<div>" +
- "<h4>Internet Explorer is not currently supported</h4>"+
- "<br /><p>Worldview uses a set of browser technologies that are not currently supported by Internet Explorer. " +
- "We are awaiting the release of IE version 10 and are hopeful that it will load Worldview properly. " +
- "In the meantime, please try loading this page in Mozilla Firefox, Google Chrome, Apple Safari, or a tablet device. " +
- "<br /><br />Thanks for your patience.</p>" +
- "<br /><p>-The Worldview development team";
-
- ieWarningOverlay.setBody(msg);
- ieWarningOverlay.render(document.body);
- ieWarningOverlay.show();
- ieWarningOverlay.center();
- }
-
- this.selector = new YAHOO.widget.Panel("selector", { zIndex:1019, visible:false } );
- this.selector.setBody("<div id='selectorbox'></div>");
- this.selector.render(document.body);
- var sel_id = this.selector.id;
- this.selector.beforeHideEvent.subscribe(function(e){ $("#"+sel_id).css("display","none");})
- this.selector.beforeShowEvent.subscribe(function(e){$("#"+sel_id).css("display","block");})
-
- // Create map
- var m = new SOTE.widget.MapSote("map",{baseLayer:"MODIS_Terra_CorrectedReflectance_TrueColor"});
- var ss = new SOTE.widget.Switch("switch",{dataSourceUrl:"a",selected:"geographic"});
- var a = new SOTE.widget.Bank("products",{dataSourceUrl:"ap_products.php",title:"My Layers",selected:{antarctic:"baselayers.MODIS_Terra_CorrectedReflectance_TrueColor~overlays.antarctic_coastlines", arctic:"baselayers.MODIS_Terra_CorrectedReflectance_TrueColor~overlays.arctic_coastlines",geographic:"baselayers.MODIS_Terra_CorrectedReflectance_TrueColor~overlays.sedac_bound"},categories:["Base Layers","Overlays"],callback:this.showSelector,selector:this.selector});
- var s = new SOTE.widget.Selector("selectorbox",{dataSourceUrl:"ap_products.php",categories:["Base Layers","Overlays"]});
- //var h = new SOTE.widget.MenuPicker("hazard",{dataSourceUrl:"data/mp_hazard.php"});
- //var tr = new SOTE.widget.MenuPicker("transition",{dataSourceUrl:"data/mp_transition.php"});
- var map = new SOTE.widget.DateSpan("time",{hasThumbnail:false});
- //Image download variables
- rb = new SOTE.widget.RubberBand("camera",{icon:"images/camera.png",onicon:"images/cameraon.png",cropee:"map"});
- var id = new SOTE.widget.ImageDownload("imagedownload",{baseLayer:"MODIS_Terra_CorrectedReflectance_TrueColor",alignTo: rb, m:m});
-
+ var entryPoint = function() {
+ this.selector = new YAHOO.widget.Panel("selector", { zIndex:1019, visible:false } );
+ this.selector.setBody("<div id='selectorbox'></div>");
+ this.selector.render(document.body);
+ var sel_id = this.selector.id;
+ this.selector.beforeHideEvent.subscribe(function(e){ $("#"+sel_id).css("display","none");})
+ this.selector.beforeShowEvent.subscribe(function(e){$("#"+sel_id).css("display","block");})
+
+ // Create map
+ var m = new SOTE.widget.MapSote("map",{baseLayer:"MODIS_Terra_CorrectedReflectance_TrueColor"});
+ var ss = new SOTE.widget.Switch("switch",{dataSourceUrl:"a",selected:"geographic"});
+ var a = new SOTE.widget.Bank("products",{dataSourceUrl:"ap_products.php",title:"My Layers",selected:{antarctic:"baselayers.MODIS_Terra_CorrectedReflectance_TrueColor~overlays.antarctic_coastlines", arctic:"baselayers.MODIS_Terra_CorrectedReflectance_TrueColor~overlays.arctic_coastlines",geographic:"baselayers.MODIS_Terra_CorrectedReflectance_TrueColor~overlays.sedac_bound"},categories:["Base Layers","Overlays"],callback:this.showSelector,selector:this.selector});
+ var s = new SOTE.widget.Selector("selectorbox",{dataSourceUrl:"ap_products.php",categories:["Base Layers","Overlays"]});
+ //var h = new SOTE.widget.MenuPicker("hazard",{dataSourceUrl:"data/mp_hazard.php"});
+ //var tr = new SOTE.widget.MenuPicker("transition",{dataSourceUrl:"data/mp_transition.php"});
+ var map = new SOTE.widget.DateSpan("time",{hasThumbnail:false});
+ //Image download variables
+ rb = new SOTE.widget.RubberBand("camera",{icon:"images/camera.png",onicon:"images/cameraon.png",cropee:"map"});
+ var id = new SOTE.widget.ImageDownload("imagedownload",{baseLayer:"MODIS_Terra_CorrectedReflectance_TrueColor",alignTo: rb, m:m});
+ };
+
+ entryPoint();
};