Ticket #5671: 5671.patch

File 5671.patch, 1.4 KB (added by WebSpellChecker.net, 14 years ago)
  • _source/plugins/scayt/plugin.js

     
    275275                        var scaytUrl  =  editor.config.scayt_srcUrl || ( protocol + '//' + baseUrl );
    276276                        var scaytConfigBaseUrl =  plugin.parseUrl( scaytUrl ).path +  '/';
    277277
    278                         CKEDITOR._djScaytConfig =
    279                         {
    280                                 baseUrl: scaytConfigBaseUrl,
    281                                 addOnLoad:
    282                                 [
    283                                         function()
    284                                         {
    285                                                 CKEDITOR.fireOnce( 'scaytReady' );
    286                                         }
    287                                 ],
    288                                 isDebug: false
    289                         };
    290                         // Append javascript code.
    291                         CKEDITOR.document.getHead().append(
    292                                 CKEDITOR.document.createElement( 'script',
    293                                         {
    294                                                 attributes :
    295                                                         {
    296                                                                 type : 'text/javascript',
    297                                                                 src : scaytUrl
    298                                                         }
    299                                         })
    300                         );
     278                        if(typeof scayt == 'undefined'){
     279                                CKEDITOR._djScaytConfig =
     280                                {
     281                                        baseUrl: scaytConfigBaseUrl,
     282                                        addOnLoad:
     283                                        [
     284                                                function()
     285                                                {
     286                                                        CKEDITOR.fireOnce( 'scaytReady' );
     287                                                }
     288                                        ],
     289                                        isDebug: false
     290                                };
     291                                // Append javascript code.
     292                                CKEDITOR.document.getHead().append(
     293                                        CKEDITOR.document.createElement( 'script',
     294                                                {
     295                                                        attributes :
     296                                                                {
     297                                                                        type : 'text/javascript',
     298                                                                        src : scaytUrl
     299                                                                }
     300                                                })
     301                                );
     302                        }else{
     303                                CKEDITOR.fireOnce( 'scaytReady' );
     304                        }
    301305
    302306                        return null;
    303307                },
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy