Hide location and status bar and skip Zotero translators on TinyMCE popups
This commit is contained in:
parent
ee6c386bae
commit
d309ad2539
|
@ -406,13 +406,18 @@
|
|||
});
|
||||
|
||||
if (self._eventHandler) {
|
||||
self._iframe.contentWindow.wrappedJSObject.handleEvent = self._eventHandler;
|
||||
self._iframe.contentWindow.wrappedJSObject.zoteroHandleEvent = self._eventHandler;
|
||||
}
|
||||
|
||||
// Run Cut/Copy/Paste with chrome privileges
|
||||
self._iframe.contentWindow.wrappedJSObject.zoteroExecCommand = function (doc, 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);
|
||||
|
||||
|
|
|
@ -350,6 +350,11 @@ var Zotero_Browser = new function() {
|
|||
if (_locationBlacklist.indexOf(doc.location.href) != -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore TinyMCE popups
|
||||
if (!doc.location.host && doc.location.href.indexOf("tinymce/themes/advanced") != -1) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
|
|
|
@ -16,16 +16,12 @@
|
|||
gecko_spellcheck : true,
|
||||
|
||||
handle_event_callback : function (event) {
|
||||
if (handleEvent) {
|
||||
handleEvent(event);
|
||||
}
|
||||
zoteroHandleEvent(event);
|
||||
},
|
||||
|
||||
onchange_callback : function () {
|
||||
var event = { type: 'change' };
|
||||
if (handleEvent) {
|
||||
handleEvent(event);
|
||||
}
|
||||
zoteroHandleEvent(event);
|
||||
},
|
||||
|
||||
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) {
|
||||
var whiteSpaceRe = /^\s*|\s*$/g,
|
||||
undefined, isRegExpBroken = 'B'.replace(/A(.)|B/, '$1') === '$1';
|
||||
|
@ -11120,7 +11122,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
|
|||
|
||||
if (value === undefined)
|
||||
value = null;
|
||||
|
||||
|
||||
return editor.getDoc().execCommand(command, ui, value);
|
||||
};
|
||||
|
||||
|
@ -12739,6 +12741,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
|
|||
// Ignore
|
||||
}
|
||||
|
||||
// Added by Dan S./Zotero
|
||||
zoteroFixWindow(w);
|
||||
|
||||
if (!w)
|
||||
alert(t.editor.getLang('popup_blocked'));
|
||||
|
|
Loading…
Reference in New Issue
Block a user