mirror of https://github.com/gorhill/uBlock.git
Merge pull request #492 from chrisaljoudi/master
Way simplify vAPI closePopup for Safari
This commit is contained in:
commit
08f4644070
|
@ -114,22 +114,10 @@ vAPI.i18n = function(s) {
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
vAPI.closePopup = function() {
|
vAPI.closePopup = function() {
|
||||||
var safr = safari.extension.globalPage.contentWindow.safari;
|
var popover = safari.extension.popovers[0];
|
||||||
var items = safr.extension.toolbarItems;
|
if ( popover ) {
|
||||||
|
popover.hide();
|
||||||
for ( var i = 0; i < items.length; i++ ) {
|
|
||||||
if ( items[i].browserWindow !== safr.application.activeBrowserWindow ) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( items[i].popover && items[i].popover.visible ) {
|
|
||||||
items[i].popover.hide();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
Loading…
Reference in New Issue