mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-02 08:52:45 +01:00
Firefox: suppress some "unsafe CPOW usage" message
This commit is contained in:
parent
478476439c
commit
f6e996c25a
@ -1418,15 +1418,23 @@ vAPI.contextMenu.create = function(details, callback) {
|
|||||||
this.onCommand = function() {
|
this.onCommand = function() {
|
||||||
var gContextMenu = this.ownerDocument.defaultView.gContextMenu;
|
var gContextMenu = this.ownerDocument.defaultView.gContextMenu;
|
||||||
var details = {
|
var details = {
|
||||||
menuItemId: this.id,
|
menuItemId: this.id
|
||||||
tagName: gContextMenu.target.tagName.toLowerCase()
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( gContextMenu.inFrame ) {
|
if ( gContextMenu.inFrame ) {
|
||||||
|
details.tagName = 'iframe';
|
||||||
details.frameUrl = gContextMenu.focusedWindow.location.href;
|
details.frameUrl = gContextMenu.focusedWindow.location.href;
|
||||||
} else if ( gContextMenu.onImage || gContextMenu.onAudio || gContextMenu.onVideo ) {
|
} else if ( gContextMenu.onImage ) {
|
||||||
|
details.tagName = 'img';
|
||||||
|
details.srcUrl = gContextMenu.mediaURL;
|
||||||
|
} else if ( gContextMenu.onAudio ) {
|
||||||
|
details.tagName = 'audio';
|
||||||
|
details.srcUrl = gContextMenu.mediaURL;
|
||||||
|
} else if ( gContextMenu.onVideo ) {
|
||||||
|
details.tagName = 'video';
|
||||||
details.srcUrl = gContextMenu.mediaURL;
|
details.srcUrl = gContextMenu.mediaURL;
|
||||||
} else if ( gContextMenu.onLink ) {
|
} else if ( gContextMenu.onLink ) {
|
||||||
|
details.tagName = 'a';
|
||||||
details.linkUrl = gContextMenu.linkURL;
|
details.linkUrl = gContextMenu.linkURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user