删除cloudflare渲染块javascript

时间:2018-07-15 20:57:35

标签: javascript cloudflare

我使用cloudflare保护了我的网站,但看起来cloudflare如下添加了块渲染javascript:

http://www.keronsoft.com/cdn-cgi/apps/head/W1j6BzG7xAyKGShjmxldmxxxxxx.js

  

; window.CloudflareApps = window.Eager = window.CloudflareApps || window.Eager || {}; window.CloudflareApps = window.CloudflareApps ||| {}; CloudflareApps.siteId =“ 83fd88898f7208a330f4b1ce76xxxxxx”; CloudflareApps = .installs || {} ;;(function(){CloudflareApps.internal = CloudflareApps.internal || {}; var   errors = []; CloudflareApps.internal.placementErrors =错误; var   errorHashes = {} var noteError = function(options){var   hash = options.selector +'::'+ options.type +'::'+(options.installId ||''); if(errorHashes [hash])   return; errorHashes [hash] = true; errors.push(options);} var   initializedSelectors = {}; var   currentInit = false; CloudflareApps.internal.markSelectors = function(){if(!currentInit){check(); currentInit = true; setTimeout(function(){currentInit = false;});}}   var check = function(){var   installs = window.CloudflareApps.installs; for(var installId in   安装){if(!installs.hasOwnProperty(installId))Continue; var   selectors = installs [installId] .selectors; if(!selectors)   继续;对于(选择器中的var键){if(!selectors.hasOwnProperty(key))   继续; var hash = installId +“ ::” + key; if(initializedSelectors [hash])   继续; var   els = document.querySelectorAll(selectors [key]); if(els && els.length> 1){noteError({type:'init:too-many',option:key,selector:selectors [key],installId:installId}) ; initializedSelectors [hash] = true; continue;} else   if(!els || !! els.length){继续;}   initializedSelectors [hash] = true; els [0] .setAttribute('cfapps-selector',selectors [key]);}}}   CloudflareApps.querySelector = function(selector){if(selector ==='body'|| selector ==='head'){返回   document [selector];} CloudflareApps.internal.markSelectors(); var   els = document.querySelectorAll('[cfapps-selector =“'+ selector +'”]'); if(!els ||!els.length){noteError({type:'select:not-found:by-attribute' ,selector:selector}); els = document.querySelectorAll(selector); if(!els ||!els.length){noteError({type:'select:not-found:by-query',selector:selector}) ;返回   null;}其他   if(els.length> 1){noteError({type:'select:toomany:by-query',selector:selector});}   返回els [0];}   if(els.length> 1){noteError({type:'select:too-many:by-attribute',selector:selector});}   return els [0];}})();;(function(){var   prevEls = {}; CloudflareApps.createElement = function(options,prevEl){CloudflareApps.internal.markSelectors(); try {if(prevEl && prevEl.parentNode){var   replaceEl; if(prevEl.cfAppsElementId){replacedEl = prevEls [prevEl.cfAppsElementId];}   if(replacedEl){prevEl.parentNode.replaceChild(replacedEl,prevEl);删除   prevEls [prevEl.cfAppsElementId];}其他{prevEl.parentNode.removeChild(prevEl);}}   var element = document.createElement('cloudflare-app'); var   容器;尝试{container = CloudflareApps.querySelector(options.selector);}捕获(e){}   if(!container){return element;}   if(!container.parentNode &&((options.method ==“之后” ||| options.method ==“之前” || options.method ==“替换”)){返回元素;} if(container == document.body ){if(options.method ==“ after”)   options.method =“ append”;否则if(options.method ==“ before”)   options.method =“ prepend”;}   switch(options.method){case“ prepend”:if(container.firstChild){container.insertBefore(element,container.firstChild); break;}   case“ append”:container.appendChild(element); break; case“ after”:if(container.nextSibling){container.parentNode.insertBefore(element,container.nextSibling);} else {container.parentNode.appendChild(element) ;}   break; case“ before”:container.parentNode.insertBefore(element,container); break; case“ replace”:try {id = element.cfAppsElementId = Math.random()。toString(36); prevEls [id] = container ;}抓住(e){}   container.parentNode.replaceChild(element,container);}返回   element;} catch(e){if(typeof console!==“ undefined” && typeof   console.error!==“未定义”){console.error(“创建Cloudflare时出错   应用   element“,e);}}}})));;(function(){CloudflareApps.matchPage = function(patterns){if(!patterns ||!patterns.length){return   真正;}   if(window.CloudflareApps && CloudflareApps.proxy && CloudflareApps.proxy.originalURL){var   url = CloudflareApps.proxy.originalURL.parsed; var   loc = url.host + url.path;}其他{var   loc = document.location.host + document.location.pathname;} for(var   i = 0; i

只是想知道是否有可能删除呈现的javascript块。

欢迎您发表评论。

1 个答案:

答案 0 :(得分:0)

您似乎已安装了一个或多个Cloudflare应用程序。您看到的JavaScript与应用相关。如果您“卸载”所有应用程序,它将消失。