This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/application/media/js/tiny_mce/tiny_mce.js

1 line
167 KiB
JavaScript
Raw Normal View History

2013-10-10 02:44:53 +00:00
(function(d){var a=/^\s*|\s*$/g,e,c="B".replace(/A(.)|B/,"$1")==="$1";var b={majorVersion:"3",minorVersion:"4b1",releaseDate:"2010-12-20",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=d.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);if(d.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m<f.length;m++){if(r=f[m].href){if(/^https?:\/\/[^\/]+$/.test(r)){r+="/"}k=r?r.match(/.*\//)[0]:""}}function h(p){if(p.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(p.src)){if(/_(src|dev)\.js/g.test(p.src)){s.suffix="_src"}if((j=p.src.indexOf("?"))!=-1){s.query=p.src.substring(j+1)}s.baseURL=p.src.substring(0,p.src.lastIndexOf("/"));if(k&&s.baseURL.indexOf("://")==-1&&s.baseURL.indexOf("/")!==0){s.baseURL=k+s.baseURL}return s.baseURL}return null}f=q.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}l=q.getElementsByTagName("head")[0];if(l){f=l.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}}return},is:function(g,f){if(!f){return g!==e}if(f=="array"&&(g.hasOwnProperty&&g instanceof Array)){return true}return typeof(g)==f},makeMap:function(f,j,h){var g;f=f||[];j=j||",";if(typeof(f)=="string"){f=f.split(j)}h=h||{};g=f.length;while(g--){h[f[g]]={}}return h},each:function(j,f,h){var k,g;if(!j){return 0}h=h||j;if(j.length!==e){for(k=0,g=j.length;k<g;k++){if(f.call(h,j[k],k,j)===false){return 0}}}else{for(k in j){if(j.hasOwnProperty(k)){if(f.call(h,j[k],k,j)===false){return 0}}}}return 1},trim:function(f){return(f?""+f:"").replace(a,"")},create:function(q,f,k){var o=this,g,j,l,m,h,n=0;q=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(q);l=q[3].match(/(^|\.)(\w+)$/i)[2];j=o.createNS(q[3].replace(/\.\w+$/,""),k);if(j[l]){return}if(q[2]=="static"){j[l]=f;if(this.onCreate){this.onCreate(q[2],q[3],j[l])}return}if(!f[l]){f[l]=function(){};n=1}j[l]=f[l];o.extend(j[l].prototype,f);if(q[5]){g=o.resolve(q[5]).prototype;m=q[5].match(/\.(\w+)$/i)[1];h=j[l];if(n){j[l]=function(){return g[m].apply(this,arguments)}}else{j[l]=function(){this.parent=g[m];return h.apply(this,arguments)}}j[l].prototype[l]=j[l];o.each(g,function(p,r){j[l].prototype[r]=g[r]});o.each(f,function(p,r){if(g[r]){j[l].prototype[r]=function(){this.parent=g[r];return p.apply(this,arguments)}}else{if(r!=l){j[l].prototype[r]=p}}})}o.each(f["static"],function(p,r){j[l][r]=p});if(this.onCreate){this.onCreate(q[2],q[3],j[l].prototype)}},walk:function(j,h,k,g){g=g||this;if(j){if(k){j=j[k]}b.each(j,function(l,f){if(h.call(g,l,f,k)===false){return false}b.walk(l,h,k,g)})}},createNS:function(j,h){var g,f;h=h||d;j=j.split(".");for(g=0;g<j.length;g++){f=j[g];if(!h[f]){h[f]={}}h=h[f]}return h},resolve:function(j,h){var g,f;h=h||d;j=j.split(".");for(g=0,f=j.length;g<f;g++){h=h[j[g]];if(!h){break}}return h},addUnload:function(k,j){var h=this;k={func:k,scope:j||this};if(!h.unloads){function g(){var f=h.unloads,m,p;if(f){for(p in f){m=f[p];if(m&&m.func){m.func.call(m.scope,1)}}if(d.detachEvent){d.detachEvent("onbeforeunload",l);d.detachEvent("onunload",g)}else{if(d.removeEventListener){d.removeEventListener("unload",g,false)}}h.unloads=m=f=w=g=0;if(d.CollectGarbage){CollectGarbage()}}}function l(){var m=document;if(m.readyState=="interactive"){function f(){m.detachEvent("onstop",f);if(g){g()}m=0}if(m){m.attachEvent("onstop",f)}d.setTimeout(function(){if(m){m.detachEvent("onstop",f)}},0)}}if(d.attachEvent){d.attachEvent("onunload",g);d.attachEvent("onbeforeunload",l)}else{if(d.addEventListener){d.addEventListener("unload",g,false)}}h.unloads=[k]}else{h.unloads.push(k)}return k},removeUnload:function(j){var g=this.unloads,h=null;b.each(g,function(k,f){if(k&&k.func==j){g.splice(f,1);h=j;return false}});return h},explode:function(f,g){