1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-23 02:42:41 +01:00

Way simplify vAPI closePopup for Safari

This commit is contained in:
Chris 2015-01-13 13:55:52 -07:00
parent 7bf0113db9
commit c255f02f0f

View File

@ -114,22 +114,10 @@ vAPI.i18n = function(s) {
/******************************************************************************/
vAPI.closePopup = function() {
var safr = safari.extension.globalPage.contentWindow.safari;
var items = safr.extension.toolbarItems;
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();
}
var popover = safari.extension.popovers[0];
if ( popover ) {
popover.hide();
}
};
/******************************************************************************/
})();
/******************************************************************************/