commit f17e0d6d288a86e7525cb6b051e3872651f7f176
parent d309ad253914cf4a66768f659f06f0df12005def
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 9 Oct 2010 18:08:38 +0000
Reapply r3565 to fix TinyMCE in XPI builds
Diffstat:
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/tinymce/tiny_mce.js b/chrome/content/zotero/tinymce/tiny_mce.js
@@ -547,13 +547,23 @@ tinymce.create('tinymce.util.Dispatcher', {
// Parse URL (Credits goes to Steave, http://blog.stevenlevithan.com/archives/parseuri)
u = u.replace(/@@/g, '(mce_at)'); // Zope 3 workaround, they use @@something
+
+ // Added by Dan S./Zotero
+ u = u.replace("jar:file", "jarfile");
+ u = u.replace("zotero@chnm.gmu.edu", "zotero.chnm.gmu.edu");
+
u = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(u);
each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], function(v, i) {
var s = u[i];
- // Zope 3 workaround, they use @@something
- if (s)
+ // Modified by Dan S./Zotero
+ if (s) {
+ // Zope 3 workaround, they use @@something
s = s.replace(/\(mce_at\)/g, '@@');
+
+ s = s.replace("jarfile", "jar:file");
+ s = s.replace("zotero.chnm.gmu.edu", "zotero@chnm.gmu.edu");
+ }
t[v] = s;
});
@@ -922,7 +932,8 @@ tinymce.create('static tinymce.util.XHR', {
function ready() {
if (!o.async || x.readyState == 4 || c++ > 10000) {
- if (o.success && c < 10000 && x.status == 200)
+ // Modified by Dan S./Zotero
+ if (o.success && c < 10000 && (x.status == 200 || x.status == 0))
o.success.call(o.success_scope, '' + x.responseText, x, o);
else if (o.error)
o.error.call(o.error_scope, c > 10000 ? 'TIMED_OUT' : 'GENERAL', x, o);