加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
_loadsvg.htm 1.86 KB
一键复制 编辑 原始数据 按行查看 历史
Ecava_IGX 提交于 2022-08-16 14:23 . 上传工程文件
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link href="system/styles/igrX.css" rel="stylesheet" type="text/css"/>
<title>SVG Loader</title>
</head>
<body scroll="no" class="no-scroll">
</body>
<script type="text/javascript" src="system/scripts/igrX.js"></script>
<script type='text/javascript'>
window['preload'] = new function() {
this['load'] = function() {
var svgEmbeds = document.getElementsByTagName("embed");
var opt = {};
// Get saved data from localStorage
var setting = localStorage['getItem']('_faceplate');
if(!!setting){
// Save data to sessionStorage
sessionStorage.setItem('_faceplate_ss', setting);
}
else{
// Get saved data from sessionStorage
setting = sessionStorage.getItem('_faceplate_ss');
}
opt.faceplate = JSON['parse'](!!setting ? setting : '{}');
localStorage['removeItem']('_faceplate');
var svg = new window['svgEngine'](svgEmbeds[0], function(svgObj) {
setTimeout(function(){
svgObj['realTime'](true);
}, 1000);
}, opt);
};
return this;
};
var params = location.search.substring(1).split('&'),
src;
for (var i in params) {
var param = params[i].split('=');
if (param[0] == 'src')
src = param[1];
}
if (src.match("javascript:") || src.match("data:") || src.match("[\:\*\/\?\"\|\<\>]"))
document.body.innerHTML="<div style='z-index:0;overflow:hidden'height='100%'width='100%'><h1>Error: XSS detected. This may be a hacking attempt.</h1></div>"
else
document.body.innerHTML="<embed type='image/svg+xml'style='z-index:0;overflow:hidden'id='idsvg'wmode='transparent'height='100%'width='100%'src='"+src+"'/>";
</script>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化