2017-09-02 37 views
2

内传统的ASP脚本块我试图添加以下的JavaScript脚本块错误

<div class="pubble-app PQAQ_section" data-app-id="43522"></div> 
<script src="https://cdn.pubble.io/javascript/loader.js" defer></script> 

我使用的是传统的ASP。但我一直得到的错误是“脚本块不能放在另一个脚本块中。”我试过在这里找到的document.write技术:Javascript code in classic asp,但没有去。

的loader.js代码:

var pbsafaridialogWindow,safariwindow_poll,ttt,initModuleTest;var pubbleLoader={};var pbldv="170828001";if(!String.prototype.trim){String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")}}if(!String.prototype.len){String.prototype.len=function(){return this.trim().replace(/[^\x00-\xff]/g,"**").length}}if(!String.prototype.startsWith){String.prototype.startsWith=function(substring){var reg=new RegExp("^"+substring);return reg.test(this)}}if(!String.prototype.replaceAll){String.prototype.replaceAll=function(reallyDo,replaceWith,ignoreCase){if(!RegExp.prototype.isPrototypeOf(reallyDo)){return this.replace(new RegExp(reallyDo,(ignoreCase?"gi":"g")),replaceWith)}else{return this.replace(reallyDo,replaceWith)}}}if(typeof(window.pubbleLoader_init)==="undefined"){var pubbleLoader=(function(args){if(typeof(args)!=="undefined"){alert("args");initModule.loadConfig(args)}var initModule={removeParameter:function(url,parameter){var urlparts=url.split("?");if(urlparts.length>=2){var urlBase=urlparts.shift();var queryString=urlparts.join("?");var prefix=encodeURIComponent(parameter)+"=";var pars=queryString.split(/[&;]/g);for(var i=pars.length;i-->0;){if(pars[i].lastIndexOf(prefix,0)!==-1){pars.splice(i,1)}}url=urlBase+"?"+pars.join("&")}return url},filterPubbleParas:function(url){url=this.removeParameter(url,"PPMID");url=this.removeParameter(url,"PPMID");url=this.removeParameter(url,"visitor");url=this.removeParameter(url,"PPBUID");url=this.removeParameter(url,"PPBLINK");url=this.removeParameter(url,"myenquiry");url=this.removeParameter(url,"PPBUT");url=this.removeParameter(url,"PPBCID");url=url.replace("#myenquiry","");url=url.replace(/\?\s*$/,"");return url},initParams:function(){var data={callback:"pubbleLoader.initLoader"};for(var v in pubbleLoader.init){if(pubbleLoader.init.hasOwnProperty(v)){switch(v){default:if(typeof pubbleLoader.init[v]!=="undefined"&&pubbleLoader.init[v]!==null){data[v]=pubbleLoader.init[v]}break}}}initModule.initParams=function(){return data};return data},encode:function(a){return escape(this._utf8_encode(a))},decode:function(a){return this._utf8_decode(unescape(a))},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e<b.length;e++){var d=b.charCodeAt(e);if(d<128){a+=String.fromCharCode(d)}else{if((d>127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a},_utf8_decode:function(a){var b="";var d=0;var e=c1=c2=0;while(d<a.length){e=a.charCodeAt(d);if(e<128){b+=String.fromCharCode(e);d++}else{if((e>191)&&(e<224)){c2=a.charCodeAt(d+1);b+=String.fromCharCode(((e&31)<<6)|(c2&63));d+=2}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);b+=String.fromCharCode(((e&15)<<12)|((c2&63)<<6)|(c3&63));d+=3}}}return b}};initModule.checkSafariWindow=function(){try{if(pbsafaridialogWindow!=null&&pbsafaridialogWindow.closed){pbsafaridialogWindow=null;clearInterval(safariwindow_poll);var initPath=pubbleLoader.servers.actionDomain+"/api/init.htm";DynamicLoadScriptQueue.AddTask(initPath+"?v="+new Date().getTime()+"&"+pubbleLoader.utils.String.toParams(initModule.initParams()),"UTF-8")}}catch(exception){}},initModule.init=function(divs){for(var i=0;i<divs.length;i++){var div=divs[i];var PBAppID=pubbleLoader.utils.getQueryString("PBAppID");var PBID=pubbleLoader.utils.getQueryString("PBID");if(PBAppID){div.setAttribute("data-app-id",PBAppID)}if(PBID){div.setAttribute("data-app-identifier",PBID)}var id=div.getAttribute("data-app-id");var identifier=div.getAttribute("data-app-identifier");var assignAppIds=div.getAttribute("assignAppIds");var assignAccountIds=div.getAttribute("assignAccountIds");var layout=div.getAttribute("data-app-layout");var token=div.getAttribute("data-app-token");var conver_id=div.getAttribute("data-app-conversation-id");var autho_info=div.getAttribute("data-app-auth_info");var signout=div.getAttribute("data-app-signout");if(!layout){layout="embed"}if(id=="37667"||id=="37631"){initModule.loadLink(pubbleLoader.servers.actionDomain+"/resources/LQA/css/LQA_style_skeleton.css");div.className+=" PQAT_skin_skeleton"}div.setAttribute("id","pubble_app_"+id);var initData={};if(assignAppIds){initData.assignAppIds=assignAppIds}if(assignAccountIds){initData.assignAccountIds=assignAccountIds}if(signout&&signout!==undefined){initData.signOut=signOut}if(autho_info&&auth_info!==undefined){initData.autho_info=auth_info}initData.appID=id;if(identifier!==undefined&&identifier!=null&&identifier!=""){initData.identifier=identifier}initData.layout=layout;initData.callback="pubbleLoader.initLoader";initData.url=initModule.encode(initModule.filterPubbleParas(window.location.href.split("#")[0]));if(token!=undefined&&token!=null){initData.userToken=encodeURIComponent(token);if(conver_id!=undefined&&conver_id!=null){initData.conversationId=conver_id}initData.is_conversation_app=1}var initPath=pubbleLoader.servers.actionDomain+"/api/init.htm"; 
DynamicLoadScriptQueue.AddTask(initPath+"?v="+new Date().getTime()+"&"+pubbleLoader.utils.String.toParams(initData),"UTF-8")}};initModule.loadScript=function(d,g){var f=document.getElementsByTagName("head")[0];if(!f){f=document.getElementsByTagName("body")[0]}var h,e,c=document.createElement("script");c.type="text/javascript";c.src=d;if(g){c.async=true}for(e=0;e<f.childNodes.length;e++){if(f.childNodes[e].tagName=="link"){h=f.childNodes[e]}}if(!h){f.appendChild(c)}else{a.insertSiblingAfter(c,h)}};initModule.insertSiblingAfter=function(c,d){if(d.nextSibling===undefined){d.parentNode.appendChild(c)}else{d.parentNode.insertBefore(c,d.nextSibling)}},initModule.loadLink=function(c){var f=document.getElementsByTagName("head")[0],g,e,d=document.createElement("link");if(!f){f=document.getElementsByTagName("body")[0]}d.rel="stylesheet";d.type="text/css";d.href=c;d.data="pubble";d.media="all";var att=document.createAttribute("data");att.value="pb";d.setAttributeNode(att);for(e=0;e<f.childNodes.length;e++){if(f.childNodes[e].tagName=="link"){g=f.childNodes[e]}}if(!g){f.appendChild(d)}else{f.appendChild(d)}};if(window.pubbleApp_config){pubbleLoader=function(pubbleApp_config){if(typeof(pubbleApp_config)!=="undefined"){initModule.nfig(pubbleApp_config)}initModule.init();return pubbleLoader}}else{var divs=getElementsByClassName("pubble-app");pubbleLoader=function(args){initModule.init(divs);return pubbleLoader}}pubbleLoader.inject=function(src,type){type=type||"js";if(type=="js"){var s=document.createElement("script");c;s.type="text/javascript";s.async=true;s.src=src}else{if(type=="css"){var s=document.createElement("link");s.type="text/css";s.rel="stylesheet";s.href=src}}(document.getElementsByTagName("body")[0]).appendChild(s)};pubbleLoader.onInitialize=[];pubbleLoader.init={};pubbleLoader.config={};pubbleLoader.data={};pubbleLoader.libs=[];pubbleLoader.apps=[];pubbleLoader.servers={web:"",actionDomain:"http://www.pubble.io",mediaDomain:"http://media.pubble.io",cdnDomain:"https://d2dfzm19238yrf.cloudfront.net"};pubbleLoader.servers.actionDomain=("https:"==document.location.protocol)?"https://www.pubble.io":"http://www.pubble.io";pubbleLoader.servers.mediaDomain=("https:"==document.location.protocol)?"https://media.pubble.io":"http://media.pubble.io";pubbleLoader.initLoader=function(c){if(c.status=="true"||c.code=="200"){var obj=document.getElementById("pubble_app_"+c.parameters.appId);var token=obj.getAttribute("data-app-token");if(c.appType=="qa"||c.appType=="BL"||c.appType=="LQ"){var locale=c.locale;var obj=document.getElementById("pubble_app_"+c.parameters.appId);var token=obj.getAttribute("data-app-token");var l2=obj.getAttribute("data-app-locale");if(l2!=undefined&&l2!=null){locale=l2}if(locale!=""&&locale!="en"){DynamicLoadScriptQueue.AddTask("https://www.pubble.io/resources/i18n/qa-"+locale+".js","utf-8")}}if(token!=undefined&&token!=null){initModule.loadLink("//www.pubble.io/resources/Pubble-App-CORE/css/pubble-core.css");var pusherLib=("https:"==document.location.protocol)?"https://js.pusher.com/2.2/pusher.min.js":"http://js.pusher.com/2.2/pusher.min.js";DynamicLoadScriptQueue.AddTask(pusherLib,"utf-8");var script_url=c.scriptURL;DynamicLoadScriptQueue.AddTask(script_url,"UTF-8");c.strings={};c.appType="qac";pubbleLoader.apps.push(c)}else{if(c.appType=="CN"){var script_url=c.scriptURL;var pusherLib=("https:"==document.location.protocol)?"https://js.pusher.com/2.2/pusher.min.js":"http://js.pusher.com/2.2/pusher.min.js";DynamicLoadScriptQueue.AddTask(pusherLib,"utf-8");DynamicLoadScriptQueue.AddTask(script_url,"UTF-8");initModule.loadLink("https://d5p15xwlzsa76.cloudfront.net/pubblebot/cw/css/pubble-cw.css");initModule.loadLink("https://d5p15xwlzsa76.cloudfront.net/pubblebot/cw/css/normalize.css");initModule.loadLink("https://d5p15xwlzsa76.cloudfront.net/pubblebot/sb/css/pubble-sb.css");pubbleLoader.apps.push(c)}else{if(c.appType=="qa"||c.appType=="BL"||c.appType=="LQ"){var obj=document.getElementById("pubble_app_"+c.parameters.appId);if(obj==null){return false}if(obj.offsetWidth>600&&c.layout!=="modalbox"&&pubbleLoader.utils.checkMetaView()){c.showOnIpad=1}if(c.SSoenabled){c.showOnIpad=1}c.showPresense=1;if(c.scriptURL.indexOf("lib4")!==-1){c.qav3=true}else{c.qav3=false}if(c.scriptURL.indexOf("core")!==-1){c.qav4=true}else{c.qav4=false}var pURL=pubbleLoader.utils.getQueryString("PBURL");var PBID=pubbleLoader.utils.getQueryString("PBID");var PBLayout=pubbleLoader.utils.getQueryString("PBLayout");var PBAppID=pubbleLoader.utils.getQueryString("PBAppID");var PPMID=0;var reg=new RegExp("PPMID(\\d+)","i");if(reg.test(window.location.href)){PPMID=RegExp.$1}c.selfhost=0;if(pURL){c.pageURL=pURL;c.selfhost=1}if(PBID){c.identifier=PBID}else{if(c.page!=null&&c.page.identifier!==""){pubbleLoader.config.identifier=c.page.identifier;c.identifier=pubbleLoader.config.identifier}else{pubbleLoader.config.identifier=c.parameters.appId;c.identifier=pubbleLoader.config.identifier}}if(PBLayout){c.layout=PBLayout}if(PBAppID){c.appID=PBAppID 
}if(PPMID){c.PPMID=PPMID}var tmpl="";if(c.qav4){initModule.loadLink("//www.pubble.io/resources/Pubble-App-CORE/css/pubble-core.css");tmpl='<div style="height:50px; width:100%;"><div style="width:31px;height:31px;margin-top:9px;margin-left:50%;padding-left:-15px;"><img src="//www.pubble.io/resources/Pubble-App-CORE/img/loading.gif" alt="Pubble loading" border="0" width="31" height="31"></div></div>'}else{if(pubbleLoader.utils.isMobile()&&!c.showOnIpad){if(!pubbleLoader.utils.getQueryString("PBID")){if(!c.qav3){tmpl='<div class="PQAQ_wrapper PQAQ_wrapper_color" id="pbwidgetcontainer"><img style="width:31px !important; height:31px !important" id="loadingimg" '+'src="'+pubbleLoader.servers.cdnDomain+'/images/app/qa/loading31.gif"></div><div id="PQAQ_customcss" '+'class="PQAQ_customcss"><style>.pb_highlight{opacity:0.5}</style></div><div id="PQAQ_social" class="PQAQ_social"></div>'+'<div id="PQAQ_debug" class="PQAQ_debug"></div>'}else{tmpl='<div class="PQAQ_modal_all PQAQ_off"><div class="PQAQ_modal"><div class="PQAQ_modal_close"></div> <div class="PQAQ_modal_header"></div><div class="PQAQ_modal_content"> </div></div></div> <div class="PQAQ_wrapper PQAQ_wrapper_color" id="pbwidgetcontainer"><img style="width:31px !important; height:31px !important" id="loadingimg" '+'src="'+pubbleLoader.servers.cdnDomain+'/images/app/qa/loading31.gif"></div><div id="PQAQ_customcss" '+'class="PQAQ_customcss"><style>.pb_highlight{opacity:0.5}</style></div><div id="PQAQ_social" class="PQAQ_social"></div>'+'<div id="PQAQ_debug" class="PQAQ_debug"></div>'}c.showPresense=0}else{if(!c.qav3){if(c.selfhost){tmpl+='<div class="PQAX_holder PQAQ_hide scrollable" style="display:none">'}else{tmpl+='<div class="PQAX_holder scrollable" style="display:none">'}c.showPresense=1;tmpl+='<div class="PQAX_header">';tmpl+=' <div class="PQAX_header_menu">';tmpl+='  <a href="javascript:void(0);" class="PQAX_btn_u"></a>';tmpl+='   <a href="javascript:void(0);" class="PQAX_btn_i"></a>';tmpl+='   <a href="javascript:void(0);" class="PQAX_btn_x"></a>';tmpl+=" </div>";tmpl+=" ";tmpl+=' <div class="PQAX_header_text">';tmpl+='   <div class="PQAX_title"></div>';tmpl+="  </div>";tmpl+="  ";tmpl+="</div>";tmpl+='<div class="PQAX_user PQAQ_hide">';tmpl+=' <div class="PQAX_photo"> <img/> </div>';tmpl+=' <div class="PQAX_name"></div>';tmpl+=' <div class="PQAX_status"></div>';tmpl+=' <div class="PQAX_service">';tmpl+="  ";tmpl+=" </div>";tmpl+=' <div class="PQAX_btn_logout"></div>';tmpl+='  <div class="PQAX_btn_login PQAT_hide"></div>';tmpl+=' <!-- <div class="PQAX_btn_close"></div> -->';tmpl+="</div>";tmpl+='<div class="PQAX_heart PQAQ_hide">';tmpl+='<div class="PQAX_followers"><span id="PQAX_follower_lists"><ul id="PQAX_follower_lists_ul"></ul></span>';tmpl+='    <div class="PQAX_status_text">';tmpl+='         <span id="PQAX_status_nrq"></span>';tmpl+='    <span id="PQAX_status_qtext"></span><br />';tmpl+='    <span id="PQAX_status_nrf"></span>';tmpl+='    <span id="PQAX_status_ftext"></span>';tmpl+="    </div>";tmpl+='  </div><div class="PQAQ_clear" style="margin-bottom:5px"></div>';tmpl+='<div class="PQAX_moderators"><span id="PQAX_mod_lists"></span><div class="PQAX_moderators_text"></div>';tmpl+='   <!-- <div class="PQAX_btn_close">HIDE</div> -->';tmpl+="</div>";tmpl+="</div>";tmpl+='<div class="PQAX_content">';tmpl+='<div class="PQAQ_wrapper PQAQ_wrapper_color" id="pbwidgetcontainer"><img style="width:31px !important" id="loadingimg" '+'src="'+pubbleLoader.servers.cdnDomain+'/images/app/qa/loading31.gif"></div>';tmpl+="</div>";tmpl+='<div id="PQAQ_social" class="PQAQ_social" style="display:none"></div></div> '}else{tmpl='<div class="PQAQ_modal_all PQAQ_off"><div class="PQAQ_modal"><div class="PQAQ_modal_close"></div> <div class="PQAQ_modal_header"></div><div class="PQAQ_modal_content"> </div></div></div> <div class="PQAQ_wrapper PQAQ_wrapper_color" id="pbwidgetcontainer"><img style="width:31px !important; height:31px !important" id="loadingimg" '+'src="'+pubbleLoader.servers.cdnDomain+'/images/app/qa/loading31.gif"></div><div id="PQAQ_customcss" '+'class="PQAQ_customcss"><style>.pb_highlight{opacity:0.5}</style></div><div id="PQAQ_social" class="PQAQ_social"></div>'+'<div id="PQAQ_debug" class="PQAQ_debug"></div>'}}}else{if(c.layout=="modalbox"){tmpl='<div class="PQAQ_modalbox" style="display:none"><div class="PQAM_outer_window" style="display:none">'+'<div class="PQAM_window"><div class="PQAM_header"><a class="PQAM_close" href="javascript:void(0);"></a>  '+'    <div class="PQAQ_status"><div class="PQAQ_btn_i PQAQ_hide"></div><div class="PQAQ_status_content PQAQ_hide">'+'<div class="PQAQ_status_title_u">  </div><div class="PQAQ_moderators"><span id="PQAQ_mod_lists">'+'</span><div class="PQAQ_moderators_text"></div></div><div class="PQAQ_followers"><span id="PQAQ_follower_lists">'+'</span><div class="PQAQ_status_text"></div><div class="PQAQ_status_nr"><div id="PQAQ_status_nrq"></div>'+'<div id="PQAQ_status_nrf"></div></div></div></div></div><div class="PQAQ_status_u"><div class="PQAQ_btn_u"></div>'+'<div class="PQAQ_status_content PQAQ_hide"><div class="PQAQ_status_title "> </div><div class="PQAQ_userstatus">'+'<input class="PQAQ_userstatus_button" name="" type="button" value="" /> <div class="PQAQ_userstatus_text"> '+' </div> </div></div></div>   <div class="PQAM_title" id="PQAQ_title_mb"></div></div><div class="PQAM_middle"> '+' <div class="PQAQ_wrapper PQAQ_wrapper_color" id="pbwidgetcontainer"><img id="loadingimg" '+'src="'+pubbleLoader.servers.cdnDomain+'/images/app/qa/loading31.gif"></div><div id="PQAQ_customcss" class="PQAQ_customcss">'+'<style></style></div><div id="PQAQ_debug" class="PQAQ_debug"></div><div id="PQAQ_social" class="PQAQ_social"></div> '+'  </div><div class="PQAM_footer_line"></div><div class="PQAM_footer"><div class="PQAM_poweredby PQAQ_pubble_logo" '+'id="PQAQ_logo_mb"></div><div class="PQAM_status"></div></div></div></div></div>' 
}else{if(!c.qav3){tmpl='<div class="PQAQ_wrapper PQAQ_wrapper_color" id="pbwidgetcontainer"><img id="loadingimg" '+'style="width:31px !important" src="'+pubbleLoader.servers.cdnDomain+'/images/app/qa/loading31.gif"></div><div id="PQAQ_customcss" '+'class="PQAQ_customcss"><style>.pb_highlight{opacity:0.5}</style></div><div id="PQAQ_social" class="PQAQ_social"></div>'+'<div id="PQAQ_debug" class="PQAQ_debug"></div>'}else{tmpl='<div class="PQAQ_modal_all PQAQ_off"><div class="PQAQ_modal"><div class="PQAQ_modal_close"></div><div class="PQAQ_modal_header"></div><div class="PQAQ_modal_content"> </div></div></div> <div class="PQAQ_wrapper PQAQ_wrapper_color" id="pbwidgetcontainer"><img id="loadingimg" '+'style="width:31px !important" src="'+pubbleLoader.servers.cdnDomain+'/images/app/qa/loading31.gif"></div><div id="PQAQ_customcss" '+'class="PQAQ_customcss"><style>.pb_highlight{opacity:0.5}</style></div><div id="PQAQ_social" class="PQAQ_social"></div>'+'<div id="PQAQ_debug" class="PQAQ_debug"></div>'}}}}obj.innerHTML=tmpl;if(!c.qav4){if(c.qav3){initModule.loadLink("https://d2dfzm19238yrf.cloudfront.net/LQA/css/LQA_style.css")}else{initModule.loadLink("//www.pubble.io/resources/core/PQAB_style_v02.css")}if(navigator.userAgent.indexOf(" MSIE ")>-1){if(document.documentMode<9){c.theme="PQAM"}}if(c.theme=="PQAM"){initModule.loadLink(pubbleLoader.servers.cdnDomain+"/qabuttons/css/template_metro.css")}else{if(c.theme=="PQAC"){initModule.loadLink(pubbleLoader.servers.cdnDomain+"/qabuttons/css/template_classic.css")}else{initModule.loadLink(pubbleLoader.servers.cdnDomain+"/qabuttons/css/template_modern.css")}}}var pusherLib=("https:"==document.location.protocol)?"https://js.pusher.com/2.2/pusher.min.js":"http://js.pusher.com/2.2/pusher.min.js";DynamicLoadScriptQueue.AddTask(pusherLib,"utf-8");if(!c.qav4){if(pubbleLoader.utils.isMobile()&&!c.qav3){initModule.loadLink(pubbleLoader.servers.cdnDomain+"/css/app/qa/PQAB_style_mobile.css","UTF-8")}if(c.layout=="modalbox"){initModule.loadLink(pubbleLoader.servers.cdnDomain+"/css/app/qa/PQAB_style_modal.css","UTF-8")}if(location.href.indexOf("facebook/qa")!==-1){c.scriptURL="//www.pubble.co/resources/javascript/widget/lib3.js"}}c.strings={};DynamicLoadScriptQueue.AddTask(c.scriptURL,"UTF-8");pubbleLoader.apps.push(c)}}}}};pubbleLoader.servers.cdnDomain=(("https:"==document.location.protocol)?"https://d2dfzm19238yrf.cloudfront.net":"https://d2dfzm19238yrf.cloudfront.net");window.pubbleLoader_init=true;return pubbleLoader})()}if(typeof(pubbleLoader)==="undefined"){pubbleLoader={}}if(typeof(pubbleLoader.config)==="undefined"){pubbleLoader.config={}}if(typeof(pubbleLoader.config.strings)==="undefined"){pubbleLoader.config.strings={}}if(typeof(pubbleLoader.init)==="undefined"){pubbleLoader.config={}}if(typeof(pubbleLoader.modules)==="undefined"){pubbleLoader.modules={}}pubbleLoader.views={};var DynamicLoadScriptQueue={Loading:false,TaskQueue:[],CallBack:function(StartTime,CallBackMethod){CallBackMethod&&CallBackMethod(new Date().valueOf()-StartTime.valueOf());this.Loading=false;this.Load()},Load:function(){var toLoad=false;toLoad=(!this.Loading&&this.TaskQueue.length);if(toLoad){var Head=document.getElementsByTagName("head")[0];if(!Head){Head=document.getElementsByTagName("body")[0]}var DLSQ=this,TaskQueue=this.TaskQueue.shift(),StartTime=new Date;var Script;if(TaskQueue.href){Script=document.createElement("link")}else{Script=document.createElement("script")}this.Loading=true;Script.onload=Script.onreadystatechange=function(){if(Script&&Script.readyState&&Script.readyState!="loaded"&&Script.readyState!="complete"){return}Script.onload=Script.onreadystatechange=Script.onerror=null;DLSQ.CallBack(StartTime,TaskQueue.CallBackMethod);StartTime=TaskQueue=null};if(TaskQueue.href){Script.rel="stylesheet";Script.type="text/css";Script.href=TaskQueue.href;Script.media="all"}else{Script.src=TaskQueue.Src;Script.charset=TaskQueue.Charset||"utf-8"}var att=document.createAttribute("data");att.value="pb";Script.setAttributeNode(att);Head.appendChild(Script)}},AddTask:function(Src,Charset,CallBackMethod){if(Src.indexOf(".css")!=-1){this.TaskQueue.push({"href":Src,"rel":"stylesheet","type":"text/css","CallBackMethod":CallBackMethod})}else{this.TaskQueue.push({"Src":Src,"Charset":Charset,"CallBackMethod":CallBackMethod});this.Load()}}};pubbleLoader.utils={checkMetaView:function(){var metas=document.getElementsByTagName("meta");for(var i=0;i<metas.length;i++){if(metas[i].getAttribute("property")=="viewport"){return 1}}return 0},IE:function(){var trident=!!navigator.userAgent.match(/Trident\/7.0/);var rv=navigator.userAgent.indexOf("rv:11.0");var checked=false;var isIE=navigator.userAgent.indexOf(" MSIE ")>-1;if(isIE){checked=true}else{if(trident&&rv!=-1){checked=true}}return checked},Safari:function(){return/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)},Webkit:function(){return navigator.userAgent.match(/Webkit/i)},Android:function(){return navigator.userAgent.match(/Android/i) 
},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},iPad:function(){return navigator.userAgent.match(/iPad/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return(this.Android()||this.BlackBerry()||this.iOS()||this.Opera()||this.Windows())},isMobile:function(){var check=false;(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|nexus|elaine|fennec|hiptop|iemobile|iPad|ip(hone|od|pad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))){check=true}})(navigator.userAgent||navigator.vendor||window.opera);return check},getQueryString:function(name){name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(window.location.href);if(results==null){return null}else{return results[1]}},String:{toParams:function(obj){var ar=[];for(var x in obj){ar.push(x+"="+obj[x])}return ar.join("&")}},Url:{encode:function(a){return escape(this._utf8_encode(a))},decode:function(a){return this._utf8_decode(unescape(a))},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e<b.length;e++){var d=b.charCodeAt(e);if(d<128){a+=String.fromCharCode(d)}else{if((d>127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a},_utf8_decode:function(a){var b="";var d=0;var e=c1=c2=0;while(d<a.length){e=a.charCodeAt(d);if(e<128){b+=String.fromCharCode(e);d++}else{if((e>191)&&(e<224)){c2=a.charCodeAt(d+1);b+=String.fromCharCode(((e&31)<<6)|(c2&63));d+=2}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);b+=String.fromCharCode(((e&15)<<12)|((c2&63)<<6)|(c3&63));d+=3}}}return b}}};if(pubbleLoader.utils.isMobile()){pubbleLoader.config.isMobile=1}if(window.pubbleApp_config){pubbleLoader(window.pubbleApp_config)}var pubbleLoader=pubbleLoader();function getElementsByClassName(className){var all=document.all?document.all:document.getElementsByTagName("*");var elements=new Array();for(var e=0;e<all.length;e++){if((all[e].className+"").indexOf(className)>-1){elements[elements.length]=all[e]}}return elements}; 
+0

根据您提供的内容,我认为引用的案例与您的案例不一样。在引用的情况下,OP想要强制无缓存的情况,并需要在URL中附加一个基于时间的唯一值来欺骗服务器不缓存。在你的情况下...以及你需要提供更多关于你在loader,js里面的细节。换句话说,我们需要看到更多的代码有任何用处。 –

+0

好的 - 在那里看不到有关新脚本声明的任何内容。必须有其他事情正在进行。你确定它是导致错误的loader.js行吗?你是否尝试删除它,确认它是原因?你确信当代码执行时没有'u'stream'脚本标记被打开但没有关闭吗? –

+0

是的,错误在loader.js行。不确定'u'[stream]脚本标记被打开的含义。 – testing123

回答

1

我可以看到发生这种错误的唯一方法是,当你有这样的代码:

<script runat="server"> 
    <div class="pubble-app PQAQ_section" data-app-id="43522"></div> 
    <script src="https://cdn.pubble.io/javascript/loader.js" defer></script> 
</script> 

虽然传统的ASP运行服务器端的什么你有客户端,这样的嵌套是非法的。在获得客户端脚本之前,结束服务器端脚本标记,并且它应该都可以正常工作。