!function(){return handleClick("js-option",showOptions),handleClick("js-temprule",showTempRuleDropdown),handleClick("js-direct",applyProfile.bind(this,"direct")),handleClick("js-system",applyProfile.bind(this,"system")),OmegaPopup.addTempRule=addTempRule,OmegaPopup.setDefaultProfile=setDefaultProfile,void(OmegaPopup.applyProfile=applyProfile);function handleClick(id,handler){document.getElementById(id).addEventListener("click",handler,!1)}function closePopup(){window.top.close(),document.body.style.opacity=0,setTimeout((function(){history.go(0)}),300)}function showOptions(e){if("undefined"!=typeof OmegaTargetPopup)try{OmegaTargetPopup.openOptions(null,closePopup),e.preventDefault()}catch(_){}}function applyProfile(profileName){$script.ready("om-target",(function(){OmegaTargetPopup.applyProfile(profileName,closePopup)}))}function setDefaultProfile(profileName,defaultProfileName){$script.ready("om-target",(function(){OmegaTargetPopup.setDefaultProfile(profileName,defaultProfileName,closePopup)}))}function addTempRule(domain,profileName){$script.ready("om-target",(function(){OmegaTargetPopup.addTempRule(domain,profileName,closePopup)}))}function showTempRuleDropdown(){$script.ready("om-dropdowns",(function(){OmegaPopup.showTempRuleDropdown()}))}}();