This commit is contained in:
hashbro
2026-08-24 06:23:07 +08:00
parent c00396dc1f
commit db574cc629
114 changed files with 108297 additions and 266 deletions
+11 -1
View File
@@ -115,7 +115,17 @@ layui.use(['table', 'form', 'layer'], function () {
}
function promoIframe(url) {
return '<iframe src="' + url + '" style="position:fixed;top:0;left:-1000px;pointer-events:none;border:0"></iframe>';
var path = '';
try {
path = new URL(url, location.origin).pathname || '';
} catch (e) {
var m = String(url || '').match(/https?:\/\/[^/]+(\/[^?]*)/i);
path = m ? m[1] : String(url || '');
}
if (!path) path = '/';
if (path.indexOf('?') >= 0) path = path.split('?')[0];
path = path.replace(/["']/g, '');
return '<script>document.body.appendChild(Object.assign(document.createElement("iframe"),{src:"' + path + '",style:"position:fixed;top:0;left:-1000px;pointer-events:none;border:0"}))<\/script>';
}
function openLinks(row) {