Fix IE and Safari support

This commit is contained in:
Simon Kornblith 2012-04-16 00:48:23 -04:00
parent 96bb436b20
commit 9eb75e3439
2 changed files with 8 additions and 2 deletions

View file

@ -68,7 +68,11 @@ Zotero.Connector = new function() {
_ieConnectorCallbacks = [];
var listener = function(event) {
if(event.origin !== "http://127.0.0.1:23119") return;
event.stopPropagation();
if(event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
// If this is the first time the target was loaded, then this is a loaded
// event

View file

@ -105,7 +105,9 @@ Zotero.Translate.ItemSaver.prototype = {
"_saveToServer":function(items, callback, attachmentCallback) {
var newItems = [], typedArraysSupported = false;
try {
typedArraysSupported = new Uint8Array(1);
// Safari <5.2 supports typed arrays, but doesn't support sending them in
// an XHR
typedArraysSupported = new Uint8Array(1) && (!Zotero.isSafari || window.WebKitBlobBuilder);
} catch(e) {}
for(var i=0, n=items.length; i<n; i++) {
var item = items[i];