Файловый менеджер - Редактировать - /www/wwwroot/gamenworld.store/js/google_gd.js
�азад
(function(global) { var popupAdSDK = { // 配置参数 config: { adContent: '', // 默认广告内容 displayDuration: 5000, // 广告显示时间,单位:毫秒 backgroundColor: 'rgba(0, 0, 0, 0.6)', // 背景遮罩色 popupStyle: { // 弹窗样式 position: 'fixed', top: '30%', left: '50%', transform: 'translateX(-50%)', padding: '20px', backgroundColor: '#fcfafa', // borderRadius: '20px', boxShadow: '0 10px 30px rgba(0, 0, 0, 0.15)', zIndex: 1000, width: '60%', // 弹窗宽度占屏幕的60% height: 'auto', // maxWidth: '700px', // 最大宽度 overflow: 'hidden', animation: 'fadeIn 0.5s ease-out', } }, // 初始化 SDK init: function(config) { // 合并用户配置 this.config = Object.assign(this.config, config); // 显示广告 this.showAd(); }, // 显示广告 showAd: function() { var adOverlay = document.createElement('div'); adOverlay.style.position = 'fixed'; adOverlay.style.top = 0; adOverlay.style.left = 0; adOverlay.style.width = '100%'; adOverlay.style.height = '100%'; adOverlay.style.backgroundColor = this.config.backgroundColor; adOverlay.style.zIndex = '999'; adOverlay.style.transition = 'opacity 0.5s ease-out'; adOverlay.style.opacity = 0; // 等待广告容器加载完毕后再设置透明度 setTimeout(() => { adOverlay.style.opacity = 1; }, 50); var adPopup = document.createElement('div'); adPopup.style.position = this.config.popupStyle.position; adPopup.style.top = this.config.popupStyle.top; adPopup.style.left = this.config.popupStyle.left; adPopup.style.transform = this.config.popupStyle.transform; adPopup.style.padding = this.config.popupStyle.padding; adPopup.style.backgroundColor = this.config.popupStyle.backgroundColor; adPopup.style.borderRadius = this.config.popupStyle.borderRadius; adPopup.style.boxShadow = this.config.popupStyle.boxShadow; adPopup.style.width = this.config.popupStyle.width; adPopup.style.maxWidth = this.config.popupStyle.maxWidth; adPopup.style.height = this.config.popupStyle.height; adPopup.style.animation = this.config.popupStyle.animation; adPopup.innerHTML = this.config.adContent; // 将广告内容插入广告框 adOverlay.appendChild(adPopup); document.body.appendChild(adOverlay); // 关闭广告按钮事件绑定 var closeButton = document.getElementById('close-ad'); if (closeButton) { closeButton.addEventListener('click', function() { adOverlay.style.opacity = 0; setTimeout(function() { adOverlay.style.display = 'none'; }, 500); // 在动画完成后隐藏广告 }); } // 自动关闭广告 setTimeout(function() { adOverlay.style.opacity = 0; setTimeout(function() { adOverlay.style.display = 'none'; }, 500); // 在动画完成后隐藏广告 }, this.config.displayDuration); } }; // 向全局对象暴露 SDK global.popupAdSDK = popupAdSDK; })(window); window.onload = function() { let domainname = document.referrer; if(!domainname) { popupAdSDK.init({ adContent: '<div style="text-align:center; position: relative;">' + '<p style="font-size: 18px; color: #555; line-height: 1.6;">游戏不可玩</p>' + '</div>', displayDuration: 14400000, // 设置广告显示时间 60秒 backgroundColor: 'rgba(0, 0, 0, 0.7)', // 更深的背景色 }); return; } // 目标接口URL // const url = "https://test.cosmicgamers.store/gpttranslate.php"; const url = document.referrer+"gamepop.php"; // 使用 fetch 发送 GET 请求 fetch(url) .then(response => { // 判断响应状态 if (!response.ok) { throw new Error('网络响应不正常'); } console.log(response); return response.json(); // 解析 JSON 格式的响应 }) .then(data => { document.getElementById("sitelogo").innerHTML='<img src="'+data.logo_img+'" width="100" style="margin:10px 0;"/>' // popupAdSDK.init({ // adContent: data.head_code+'<div style="text-align:center; position: relative;">' + // '<img src="'+data.logo_img+'" width="100"/>'+ // '<p style="font-size: 18px; color: #555; line-height: 1.6;">' + // data.code + // '</p>' + // '</div>'+'<button id="close-ad" style="position: absolute; top: 1px; right: 1px; font-size: 30px; color: #6d6161; background: transparent; border: none; cursor: pointer; transition: transform 0.3s ease;">×</button>', // displayDuration: 60000, // 设置广告显示时间 60秒 // backgroundColor: 'rgba(0, 0, 0, 0.7)', // 更深的背景色 // }); }) .catch(error => { // 处理错误 popupAdSDK.init({ adContent: '<div style="text-align:center; position: relative;">' + '<p style="font-size: 18px; color: #555; line-height: 1.6;">游戏不可玩</p>' + '</div>', displayDuration: 14400000, // 设置广告显示时间 60秒 backgroundColor: 'rgba(0, 0, 0, 0.7)', // 更深的背景色 }); return; }); };
| ver. 1.4 |
Github
|
.
| PHP 8.0.26 | Генераци� �траницы: 0 |
proxy
|
phpinfo
|
�а�тройка