/** * 插件-离站提醒插件 * 米拓企业建站系统 Copyright (C) 长沙米拓信息技术有限公司 (https://www.metinfo.cn). All rights reserved. * @Date:2023-04-23 18:05:13 */ (()=>{ // 跳转至第三方网站的提示页 if(location.search.indexOf('pageset=1')<0 && location.search.indexOf('n=met_jump_notice')<0){ $.ajax({ url:M.weburl+'app/index.php?n=met_jump_notice&c=index&a=doInfo', success:function(res){ if(res && parseInt(res.data.met_jump_notice_open)){ var white_domain=[document.domain,'wpa1.qq.com','crm2.qq.com']; function is_white_domain(url){ var res=0; for (let index = 0; index < white_domain.length; index++) { if(url.indexOf(white_domain[index])>0){ res=1; break; } } return res; } $(document).on('click','a[href^="http"]',function(e){ var href=$(this).attr('href'), this_domain=href.split('/')[2]; if(!is_white_domain(this_domain)){ e.preventDefault(); window.open(M.weburl+'app/index.php?n=met_jump_notice&c=index&a=doindex&target='+encodeURIComponent(href)); } }); } } }); } })();