Hide location and status bar and skip Zotero translators on TinyMCE popups
This commit is contained in:
parent
ee6c386bae
commit
d309ad2539
4 changed files with 18 additions and 8 deletions
|
@ -406,13 +406,18 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
if (self._eventHandler) {
|
if (self._eventHandler) {
|
||||||
self._iframe.contentWindow.wrappedJSObject.handleEvent = self._eventHandler;
|
self._iframe.contentWindow.wrappedJSObject.zoteroHandleEvent = self._eventHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run Cut/Copy/Paste with chrome privileges
|
// Run Cut/Copy/Paste with chrome privileges
|
||||||
self._iframe.contentWindow.wrappedJSObject.zoteroExecCommand = function (doc, command, ui, value) {
|
self._iframe.contentWindow.wrappedJSObject.zoteroExecCommand = function (doc, command, ui, value) {
|
||||||
return doc.execCommand(command, ui, value);
|
return doc.execCommand(command, ui, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self._iframe.contentWindow.wrappedJSObject.zoteroFixWindow = function (win) {
|
||||||
|
win.locationbar.visible = false;
|
||||||
|
win.statusbar.visible = false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this._iframe.addEventListener("DOMContentLoaded", listener, false);
|
this._iframe.addEventListener("DOMContentLoaded", listener, false);
|
||||||
|
|
||||||
|
|
|
@ -350,6 +350,11 @@ var Zotero_Browser = new function() {
|
||||||
if (_locationBlacklist.indexOf(doc.location.href) != -1) {
|
if (_locationBlacklist.indexOf(doc.location.href) != -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ignore TinyMCE popups
|
||||||
|
if (!doc.location.host && doc.location.href.indexOf("tinymce/themes/advanced") != -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (e) {}
|
catch (e) {}
|
||||||
|
|
||||||
|
|
|
@ -16,16 +16,12 @@
|
||||||
gecko_spellcheck : true,
|
gecko_spellcheck : true,
|
||||||
|
|
||||||
handle_event_callback : function (event) {
|
handle_event_callback : function (event) {
|
||||||
if (handleEvent) {
|
zoteroHandleEvent(event);
|
||||||
handleEvent(event);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onchange_callback : function () {
|
onchange_callback : function () {
|
||||||
var event = { type: 'change' };
|
var event = { type: 'change' };
|
||||||
if (handleEvent) {
|
zoteroHandleEvent(event);
|
||||||
handleEvent(event);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setup : function (ed) {
|
setup : function (ed) {
|
||||||
|
|
6
chrome/content/zotero/tinymce/tiny_mce.js
vendored
6
chrome/content/zotero/tinymce/tiny_mce.js
vendored
|
@ -1,3 +1,5 @@
|
||||||
|
// Contains modifications by Dan S./Zotero
|
||||||
|
|
||||||
(function(win) {
|
(function(win) {
|
||||||
var whiteSpaceRe = /^\s*|\s*$/g,
|
var whiteSpaceRe = /^\s*|\s*$/g,
|
||||||
undefined, isRegExpBroken = 'B'.replace(/A(.)|B/, '$1') === '$1';
|
undefined, isRegExpBroken = 'B'.replace(/A(.)|B/, '$1') === '$1';
|
||||||
|
@ -11120,7 +11122,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
|
||||||
|
|
||||||
if (value === undefined)
|
if (value === undefined)
|
||||||
value = null;
|
value = null;
|
||||||
|
|
||||||
return editor.getDoc().execCommand(command, ui, value);
|
return editor.getDoc().execCommand(command, ui, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12739,6 +12741,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
|
||||||
// Ignore
|
// Ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Added by Dan S./Zotero
|
||||||
|
zoteroFixWindow(w);
|
||||||
|
|
||||||
if (!w)
|
if (!w)
|
||||||
alert(t.editor.getLang('popup_blocked'));
|
alert(t.editor.getLang('popup_blocked'));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue