includes/clientside/tinymce/tiny_mce_gzip.js
author Dan
Mon, 05 May 2008 20:31:19 -0400
changeset 545 e4c8e706f167
parent 544 81b4499a963e
child 551 3acd624d4f4f
permissions -rw-r--r--
Add standard header comment block and date of changes to tiny_mce_gzip to conform to GPL/LGPL
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
544
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
     1
var tinyMCE_GZ = {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
     2
	settings : {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
     3
		themes : '',
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
     4
		plugins : '',
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
     5
		languages : '',
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
     6
		disk_cache : true,
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
     7
		page_name : 'tiny_mce_gzip.php',
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
     8
		debug : false,
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
     9
		suffix : ''
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    10
	},
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    11
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    12
	init : function(s, cb, sc) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    13
		var t = this, n, i, nl = document.getElementsByTagName('script');
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    14
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    15
		for (n in s)
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    16
			t.settings[n] = s[n];
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    17
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    18
		s = t.settings;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    19
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    20
		for (i=0; i<nl.length; i++) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    21
			n = nl[i];
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    22
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    23
			if (n.src && n.src.indexOf('tiny_mce') != -1)
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    24
				t.baseURL = n.src.substring(0, n.src.lastIndexOf('/'));
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    25
		}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    26
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    27
		if (!t.coreLoaded)
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    28
			t.loadScripts(1, s.themes, s.plugins, s.languages, cb, sc);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    29
	},
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    30
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    31
	loadScripts : function(co, th, pl, la, cb, sc) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    32
		var t = this, x, w = window, q, c = 0, ti, s = t.settings;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    33
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    34
		function get(s) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    35
			x = 0;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    36
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    37
			try {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    38
				x = new ActiveXObject(s);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    39
			} catch (s) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    40
			}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    41
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    42
			return x;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    43
		};
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    44
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    45
		// Build query string
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    46
		q = 'js=true&diskcache=' + (s.disk_cache ? 'true' : 'false') + '&core=' + (co ? 'true' : 'false') + '&suffix=' + escape(s.suffix) + '&themes=' + escape(th) + '&plugins=' + escape(pl) + '&languages=' + escape(la);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    47
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    48
		if (co)
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    49
			t.coreLoaded = 1;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    50
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    51
		// Send request
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    52
		x = w.XMLHttpRequest ? new XMLHttpRequest() : get('Msxml2.XMLHTTP') || get('Microsoft.XMLHTTP');
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    53
		x.overrideMimeType && x.overrideMimeType('text/javascript');
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    54
		x.open('GET', t.baseURL + '/' + s.page_name + '?' + q, !!cb);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    55
//		x.setRequestHeader('Content-Type', 'text/javascript');
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    56
		x.send('');
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    57
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    58
		// Handle asyncronous loading
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    59
		if (cb) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    60
			// Wait for response
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    61
			ti = w.setInterval(function() {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    62
				if (x.readyState == 4 || c++ > 10000) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    63
					w.clearInterval(ti);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    64
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    65
					if (c < 10000 && x.status == 200) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    66
						t.loaded = 1;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    67
						t.eval(x.responseText);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    68
						tinymce.dom.Event.domLoaded = true;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    69
						cb.call(sc || t, x);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    70
					}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    71
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    72
					ti = x = null;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    73
				}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    74
			}, 10);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    75
		} else
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    76
			t.eval(x.responseText);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    77
	},
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    78
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    79
	start : function() {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    80
		var t = this, each = tinymce.each, s = t.settings, sl, ln = s.languages.split(',');
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    81
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    82
		tinymce.suffix = s.suffix;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    83
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    84
		// Extend script loader
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    85
		tinymce.create('tinymce.compressor.ScriptLoader:tinymce.dom.ScriptLoader', {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    86
			loadScripts : function(sc, cb, s) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    87
				var ti = this, th = [], pl = [], la = [];
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    88
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    89
				each(sc, function(o) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    90
					var u = o.url;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    91
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    92
					if ((!ti.lookup[u] || ti.lookup[u].state != 2) && u.indexOf(t.baseURL) === 0) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    93
						// Collect theme
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    94
						if (u.indexOf('editor_template') != -1) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    95
							th.push(/\/themes\/([^\/]+)/.exec(u)[1]);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    96
							load(u, 1);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    97
						}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    98
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
    99
						// Collect plugin
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   100
						if (u.indexOf('editor_plugin') != -1) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   101
							pl.push(/\/plugins\/([^\/]+)/.exec(u)[1]);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   102
							load(u, 1);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   103
						}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   104
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   105
						// Collect language
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   106
						if (u.indexOf('/langs/') != -1) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   107
							la.push(/\/langs\/([^.]+)/.exec(u)[1]);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   108
							load(u, 1);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   109
						}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   110
					}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   111
				});
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   112
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   113
				if (th.length + pl.length + la.length > 0) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   114
					if (sl.settings.strict_mode) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   115
						// Async
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   116
						t.loadScripts(0, th.join(','), pl.join(','), la.join(','), cb, s);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   117
						return;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   118
					} else
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   119
						t.loadScripts(0, th.join(','), pl.join(','), la.join(','), cb, s);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   120
				}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   121
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   122
				return ti.parent(sc, cb, s);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   123
			}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   124
		});
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   125
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   126
		sl = tinymce.ScriptLoader = new tinymce.compressor.ScriptLoader();
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   127
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   128
		function load(u, sp) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   129
			var o;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   130
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   131
			if (!sp)
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   132
				u = t.baseURL + u;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   133
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   134
			o = {url : u, state : 2};
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   135
			sl.queue.push(o);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   136
			sl.lookup[o.url] = o;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   137
		};
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   138
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   139
		// Add core languages
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   140
		each (ln, function(c) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   141
			if (c)
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   142
				load('/langs/' + c + '.js');
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   143
		});
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   144
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   145
		// Add themes with languages
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   146
		each(s.themes.split(','), function(n) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   147
			if (n) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   148
				load('/themes/' + n + '/editor_template' + s.suffix + '.js');
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   149
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   150
				each (ln, function(c) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   151
					if (c)
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   152
						load('/themes/' + n + '/langs/' + c + '.js');
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   153
				});
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   154
			}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   155
		});
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   156
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   157
		// Add plugins with languages
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   158
		each(s.plugins.split(','), function(n) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   159
			if (n) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   160
				load('/plugins/' + n + '/editor_plugin' + s.suffix + '.js');
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   161
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   162
				each (ln, function(c) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   163
					if (c)
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   164
						load('/plugins/' + n + '/langs/' + c + '.js');
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   165
				});
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   166
			}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   167
		});
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   168
	},
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   169
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   170
	end : function() {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   171
	},
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   172
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   173
	eval : function(co) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   174
		var w = window;
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   175
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   176
		// Evaluate script
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   177
		if (!w.execScript) {
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   178
			if (/Gecko/.test(navigator.userAgent))
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   179
				eval(co, w); // Firefox 3.0
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   180
			else
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   181
				eval.call(w, co);
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   182
		} else
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   183
			w.execScript(co); // IE
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   184
	}
81b4499a963e Added TinyMCE compression support and made some supporting modifications to common.php
Dan
parents:
diff changeset
   185
};