403Webshell
Server IP : 156.238.232.47  /  Your IP : 216.73.216.150
Web Server : nginx/1.25.3
System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : www ( 1000)
PHP Version : 8.3.25
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/data/wwwroot/2026_03_13_01/skin/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/data/wwwroot/2026_03_13_01/skin/js/fanyi.js
/* AB模板网 www.adminbuy.cn */
document.addEventListener('DOMContentLoaded', function() {
            const languageBtn = document.querySelector('.language-btn');
            const dropdown = document.querySelector('.language-dropdown');
            const moreLanguages = document.querySelector('.more-languages');
            const languageList = document.querySelector('.language-list');
            const languageItems = document.querySelectorAll('.language-item');
            
            // 初始状态下隐藏部分语言选项
            const initialVisibleCount = 15; // 初始显示数量
            languageItems.forEach((item, index) => {
                if (index >= initialVisibleCount) {
                    item.classList.add('hidden');
                }
            });

            // 点击More Language显示所有语言
            moreLanguages.addEventListener('click', function(e) {
                e.stopPropagation();
                languageItems.forEach(item => {
                    item.classList.remove('hidden');
                });
                languageList.classList.add('show-all');
                this.style.display = 'none';
            });

            // 点击按钮显示/隐藏下拉菜单
            languageBtn.addEventListener('click', function(e) {
                e.stopPropagation();
                dropdown.classList.toggle('active');
                // 切换箭头方向
                const arrow = this.querySelector('.arrow-icon');
                arrow.style.transform = dropdown.classList.contains('active') ? 'rotate(180deg)' : '';
            });

            // 选择语言
            languageItems.forEach(item => {
                item.addEventListener('click', function() {
                    const lang = this.getAttribute('data-lang');
                    const langText = this.querySelector('span').textContent;
                    
                    // 更新按钮文本
                    document.querySelector('.current-lang').textContent = langText;
                    
                    // 关闭下拉菜单
                    dropdown.classList.remove('active');
                    languageBtn.querySelector('.arrow-icon').style.transform = '';
                    
                    console.log('Selected language:', lang);
                });
            });

            // 点击页面其他地方关闭下拉菜单
            document.addEventListener('click', function() {
                dropdown.classList.remove('active');
                languageBtn.querySelector('.arrow-icon').style.transform = '';
            });

            // 阻止下拉菜单点击事件冒泡
            dropdown.addEventListener('click', function(e) {
                e.stopPropagation();
            });
        });


$(function() {
	// 悬浮窗口
	$(".yb_conct").hover(function() {
		$(".yb_conct").css("right", "5px");
		$(".yb_bar .yb_ercode").css('height', '200px');
	}, function() {
		$(".yb_conct").css("right", "-196px");
		$(".yb_bar .yb_ercode").css('height', '53px');
	});
	// 返回顶部
	$(".yb_top").click(function() {
		$("html,body").animate({
			'scrollTop': '0px'
		}, 300)
	});
});

function copywx() {
		const range = document.createRange();
		range.selectNode(document.getElementById('wechat_id'));
		const selection = window.getSelection();
		if (selection.rangeCount > 0) selection.removeAllRanges();
		selection.addRange(range);
		document.execCommand('copy');
		alert("Copy successful!");
	}
	
var GA = {
    init:function(){
        this.sendEmail();

        this.sendTel();

        this.sendWhatsapp();

        this.sendForm();
    },
    sendData:function(elements,options){
        if(elements.length && options)
        {
            for(var i = 0,len = elements.length;i<len;i++)
            {
                elements[i].addEventListener(options.event || 'click',function(){

                    var timer = setTimeout(function(){
                        var title = document.querySelector('title');
                        //清除定时器
                        clearTimeout(timer);
                        //发送Ga
                        window.gtag && window.gtag('event', options.actionName, {
                            event_catagory:'general',
                            event_label:title ? title.text : ''
                        });
                    },1000)
                })
            }
        }
    },
    /**
     * @method sendAddToCart addtocart发送GA代码
     */
    sendEmail:function(){
        var email = document.querySelectorAll('a[href*="mailto:"]');
        //
        email.length && this.sendData(email,{actionName:'email'});
    },
    /** 
     * @method sendBuyNow buynow立即购买发送GA代码
     */
    sendTel:function(){ 
        var tel = document.querySelectorAll('a[href*="tel:"]');

        tel.length && this.sendData(tel,{actionName:'tel'});
    },
    /**
     * @method sendShopCart 查看购物车发送GA
     */
    sendWhatsapp:function(){
        var whatsapp = document.querySelectorAll('a[href*="whatsapp:"],a[href*="api.whatsapp.com"]');

        whatsapp.length 
        && 
        this.sendData(whatsapp,{actionName:'whatsapp'});
    },
    /**
     *@method load 订单详情与提交订单页面加载完毕发送GA
     */
    sendForm:function(){
        var buttons = document.querySelectorAll('form .btnCont');

        if(buttons.length)
        {
            for(var i = 0,len = buttons.length;i < len;i++)
            {
                var script = buttons[i].querySelector('.button-code'),
                    code = "window.gtag('event', 'submited', {event_label:''})"

                if(script)
                {
                    var data = JSON.parse(script.textContent || "{}");

                    data.submitcode = data.submitcode + (/;$/.test(data.submitcode) ? '' : ';') + code;

                    script.textContent = JSON.stringify(data);
                }
                else
                {
                    script = document.createElement('script');

                    script.type = 'text/json',script.className = 'button-code';

                    script.textContent = '{"submitcode":"'+code+'"}';

                    buttons[i].insertBefore(script,buttons[i].children[0]);
                }
            }
        }
    },
    /**
     * @method sendOldPCForm 老PC表单发送GA数据
     */
    sendOldPCForm:function(){ gtag('event', 'submited', {event_label:''}); }
}

GA.init();
//translate.setAutoDiscriminateLocalLanguage(); 
translate.language.setLocal('english');
translate.language.setDefaultTo('english');
	translate.selectLanguageTag.show = false;
    translate.service.use('client.edge'); 
	translate.execute();

Youez - 2016 - github.com/yon3zu
LinuXploit