this.onclick =e=> { if ( e.button == 0 ) { var win = Services.wm.getMostRecentWindow("Browser:Cookies"); win && win.close(); var win = openDialog("chrome://browser/content/preferences/cookies.xul", "", "resizable,dialog=yes,centerscreen", null); win.addEventListener("load", function s() { win.removeEventListener("load", s); var host = content.location.host, arr = host.split('.'); if ( arr.length > 2 ) host = arr[1] + "." + arr[2]; var filter = win.document.getElementById("filter"); filter.value = host; setTimeout(function() filter.doCommand(), 0); }); } if ( e.button == 1 ) gShowPopup(this); if ( e.button == 2 && !e.ctrlKey && !e.shiftKey && !e.altKey && !e.metaKey ) { e.preventDefault(); var win = Services.wm.getMostRecentWindow("Browser:Permissions"); win && win.close(); openDialog("chrome://browser/content/preferences/permissions.xul", "", "centerscreen, resizable=1", { blockVisible: 1, sessionVisible: 1, allowVisible: 1, prefilledHost: content.location.host, permissionType: "cookie", windowTitle: "Управление cookies", introText: "" }); } }; this.tooltipText = "Л: Открыть куки текущей вкладки \nС: CB Меню \nП: Открыть кукименеджер"; |