【超級偶像】20090103【冠軍積分賽PART2】
文章來源: 超級偶像 於
- 新聞取自各大新聞媒體,新聞內容並不代表本網立場!
-->
`,
"script":[{"type":"text/javascript","src":"//widgets.outbrain.com/outbrain.js","async":"async"}]
}
, "gg_rightside": {
"html":`
`,
"script":[{"type":"text/javascript","src":"//widgets.outbrain.com/outbrain.js","async":"async"}]
}
, "gg_duturandom": {
"html":`
`,
"script":[]
}
, "gg_square": {
"html":`
`,
"script":[]
}
, "gg_topbanner": {
"html":`
`,
"script":[]
}
, "gg_middlesquare": {
"html":`
`,
"script":[]
}
, "gg_dutu": {
"html":`
`,
"script":[]
}
, "gg_botline": {
"html":``,
"script":[]
}
, "gg_dututop": {
"html":`
`,
"script":[]
}
, "gg_shipintop": {
"html":`
`,
"script":[]
}
, "gg_inContent": {
"html":`
`,
"script":[]
}
, "gg_shipinrandom": {
"html":``,
"script":[]
}
, "gg_sideSticky": {
"html":`
`,
"script":[]
}
, "gg_bottombanner": {
"html":`
`,
"script":[{"type":"text/javascript","src":"//widgets.outbrain.com/outbrain.js","async":"async"}]
}
, "gg_marquee": {
"html":`
`,
"script":[]
}
}
const adEnv={
"gg_header": {
"html":``,
"script":[{"type":"text/javascript","exec":` var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; var pbjs = pbjs || {}; pbjs.que = pbjs.que || []; `},{"type":"text/javascript","src":"https://adncdnend.azureedge.net/adn-hb/adn.wnx2.js","async":""},{"type":"text/javascript","src":"https://adncdnend.azureedge.net/adn-video/WenxuecityPlayer.js","async":"async"}]
}
}
const wxcEnv = {
"base":{
"exe":[],
"src":[
{"src": "/news/js/recommendednews.js","defer":"true"},
{"src":"/js/wxcFunc.js","defer":"true"}
]
},
"func":{
"exe":[
//展示評論
'function showMoreComments(){let n = 0;for(let i=0;i
2){dom.hide();}}$("#showallcomment").show();$("#showlesscomment").hide();};',
],
"src":[
//圖片,搜索,QR code
{"src": "/news/js/view.js?v=05132024"},
//計數器
{"src":"//count.wenxuecity.com/service/count/script/do.php?type=news&id=44238&n=0&out=jsval","defer":"true"},
]
}
}
function wxcCode(){
wxcEnv.base.exe.forEach(x=>{
let tag = buildAdcode(x);
document.head.append(tag);
})
wxcEnv.base.src.forEach(src => {
let tag = buildSrc(src)
document.head.append(tag);
});
wxcEnv.func.exe.forEach(x=>{
let tag = buildAdcode(x);
document.body.append(tag);
})
wxcEnv.func.src.forEach(src => {
let tag = buildSrc(src)
document.body.append(tag);
});
}
function adcode(){
let adkey = Object.keys(ads);
adkey.forEach(x=>{
let code = ads[x].html;
let div = document.getElementById(x);
if(div)div.innerHTML = code;
ads[x].script.forEach(s=>{
if(Object.keys(s).indexOf('src')===-1){
let tag = buildAdcode(s.exec);
document.body.append(tag);
}else{
let tag = buildSrc(s);
document.body.append(tag);
}
})
})
}
function baseCode(){
let baseKeys = Object.keys(adEnv);
baseKeys.forEach(x=>{
adEnv[x].script.forEach(s=>{
if(Object.keys(s).indexOf('src')===-1){
let tag = buildAdcode(s.exec);
document.head.append(tag);
}else{
let tag = buildSrc(s);
document.head.append(tag);
}
})
})
}
function buildAdcode(script){
let tag = document.createElement('script');
tag.innerHTML = script;
return tag;
}
function buildSrc(obj){
let keys = Object.keys(obj);
let tag = document.createElement("script");
keys.forEach(key=>{
tag.setAttribute(key, obj[key]);
})
return tag ;
}