Show
Ignore:
Timestamp:
2008-03-25 08:57:35 (7 months ago)
Author:
wwalc
Message:

Fix for #1919 (file browser & relaxation mode issue)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/filemanager/browser/default/frmactualfolder.html

    r1736 r1791  
    2727                <link href="browser.css" type="text/css" rel="stylesheet"> 
    2828                <script type="text/javascript"> 
     29// Automatically detect the correct document.domain (#1919). 
     30(function() 
     31{ 
     32        var d = document.domain ; 
     33 
     34        while ( true ) 
     35        { 
     36                // Test if we can access a parent property. 
     37                try 
     38                { 
     39                        var test = window.top.opener.document.domain ; 
     40                        break ; 
     41                } 
     42                catch( e ) {} 
     43 
     44                // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
     45                d = d.replace( /.*?(?:\.|$)/, '' ) ; 
     46 
     47                if ( d.length == 0 ) 
     48                        break ;         // It was not able to detect the domain. 
     49 
     50                try 
     51                { 
     52                        document.domain = d ; 
     53                } 
     54                catch (e) 
     55                { 
     56                        break ; 
     57                } 
     58        } 
     59})() ; 
    2960 
    3061function OnResize()