From a519d01754f053eaa8301c5433c5a1c64a80d7f9 Mon Sep 17 00:00:00 2001 From: hallgren Date: Thu, 29 Mar 2012 14:11:38 +0000 Subject: gfse: show an informative error message in browsers that lack support for localStorage --- src/www/gfse/editor.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/www/gfse/editor.js') diff --git a/src/www/gfse/editor.js b/src/www/gfse/editor.js index 4edc7f193..6e7d78cd5 100644 --- a/src/www/gfse/editor.js +++ b/src/www/gfse/editor.js @@ -1440,9 +1440,13 @@ function dir_bugfix() { } if(editor) { - initial_view(); - touch_edit(); - dir_bugfix(); + if(supports_html5_storage()) { + initial_view(); + touch_edit(); + dir_bugfix(); + } + else + editor.innerHTML="

This browser does not appear to support localStorage, and the grammar editor does not work without it. Sorry!" } //console.log("hi") -- cgit v1.2.3