includes/clientside/static/enano-lib-basic.js
changeset 1343 2a31905a567d
parent 1305 ba8a648baebc
child 1344 dc96d6c5cd1e
equal deleted inserted replaced
1342:2164d18cb10c 1343:2a31905a567d
    41 
    41 
    42 // Run-time variables
    42 // Run-time variables
    43 
    43 
    44 var detect = navigator.userAgent.toLowerCase();
    44 var detect = navigator.userAgent.toLowerCase();
    45 var IE;
    45 var IE;
    46 var is_Safari;
       
    47 
    46 
    48 // Detect whether the user is running the Evil One or not...
    47 // Detect whether the user is running the Evil One or not...
    49 
    48 
    50 function checkIt(string) {
    49 function checkIt(string) {
    51 	place = detect.indexOf(string) + 1;
    50 	place = detect.indexOf(string) + 1;
    59 var is_iPhone = checkIt('iphone') || checkIt('ipod');
    58 var is_iPhone = checkIt('iphone') || checkIt('ipod');
    60 var is_iPhone_3 = checkIt('iphone') && Number(navigator.userAgent.replace(/^.*iPhone OS ([0-9]+)_([0-9]+) .*$/, '$1.$2')) >= 3.0;
    59 var is_iPhone_3 = checkIt('iphone') && Number(navigator.userAgent.replace(/^.*iPhone OS ([0-9]+)_([0-9]+) .*$/, '$1.$2')) >= 3.0;
    61 var is_Webkit = checkIt('applewebkit');
    60 var is_Webkit = checkIt('applewebkit');
    62 var is_Gecko = checkIt('gecko');
    61 var is_Gecko = checkIt('gecko');
    63 var is_firefox2 = checkIt('firefox/2.');
    62 var is_firefox2 = checkIt('firefox/2.');
       
    63 var is_Safari = checkIt('safari') ? true : false;
    64 
    64 
    65 var KILL_SWITCH = false;
    65 var KILL_SWITCH = false;
       
    66 
       
    67 var editor_formats = {};
    66 
    68 
    67 if ( IE )
    69 if ( IE )
    68 {
    70 {
    69 	var version = window.navigator.appVersion;
    71 	var version = window.navigator.appVersion;
    70 	version = version.substr( ( version.indexOf('MSIE') + 5 ) );
    72 	version = version.substr( ( version.indexOf('MSIE') + 5 ) );
    89 
    91 
    90 if ( typeof(DISABLE_MCE) == undefined )
    92 if ( typeof(DISABLE_MCE) == undefined )
    91 {
    93 {
    92 	var DISABLE_MCE = false;
    94 	var DISABLE_MCE = false;
    93 }
    95 }
    94 
       
    95 is_Safari = checkIt('safari') ? true : false;
       
    96 
    96 
    97 var cmt_open;
    97 var cmt_open;
    98 var editor_open = false;
    98 var editor_open = false;
    99 var list;
    99 var list;
   100 var edit_open = false;
   100 var edit_open = false;