Commit d40a85c5 by txy

'js抽取'

parent f21cee48
(funciton(){
var headerUrl = "https://space-api.check.icaremgt.com/ACTIVITY/gitlab-static?url=http://gitlab.icaremgt.com/tanxinyu/h5_activity/raw/master/showPhotos/";
var styleSheet = ["css/activity.css","css/dialog.css"];
var headerUrl = "https://space-api.check.icaremgt.com/ACTIVITY/gitlab-static?url=http://gitlab.icaremgt.com/tanxinyu/h5_activity/raw/master/showPhotos/";
var styleSheet = ["css/activity.css","css/dialog.css"];
var scriptArray = [
"js/jquery-3.4.1.min.js",
"js/exif.js",
"js/dialog.js",
"js/html2Json.js",
"js/pageJson.js",
"js/modalJson/shareModal.js",
"js/modalJson/voteModal.js",
"js/removeAttr.js",
"js/autoFontsize.min.js"
];
var scriptArray = [
"js/jquery-3.4.1.min.js",
"js/exif.js",
"js/dialog.js",
"js/html2Json.js",
"js/pageJson.js",
"js/modalJson/shareModal.js",
"js/modalJson/voteModal.js",
"js/removeAttr.js",
"js/autoFontsize.min.js"
];
for(var i = 0; i < styleSheet.length ;i++){
var link= document.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
link.setAttribute("href", headerUrl + styleSheet[i]);
var heads = document.getElementsByTagName("head");
if(heads.length)
heads[0].appendChild(link);
else
document.documentElement.appendChild(link);
}
for(var i = 0; i < styleSheet.length ;i++){
var link= document.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
link.setAttribute("href", headerUrl + styleSheet[i]);
var heads = document.getElementsByTagName("head");
if(heads.length)
heads[0].appendChild(link);
else
document.documentElement.appendChild(link);
}
for(var i = 0; i < scriptArray.length ;i++){
var script=document.createElement("script");
script.setAttribute("type", "text/javascript");
script.setAttribute("src", headerUrl + scriptArray[i]);
var heads = document.getElementsByTagName("head");
if(heads.length)
heads[0].appendChild(script);
else
document.documentElement.appendChild(script);
}
for(var i = 0; i < scriptArray.length ;i++){
var script=document.createElement("script");
script.setAttribute("type", "text/javascript");
script.setAttribute("src", headerUrl + scriptArray[i]);
var heads = document.getElementsByTagName("head");
if(heads.length)
heads[0].appendChild(script);
else
document.documentElement.appendChild(script);
}
})();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment