在Blogger上停用ieretrofit.js [英] Disabling ieretrofit.js on Blogger

查看:106
本文介绍了在Blogger上停用ieretrofit.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此脚本在IE 9中给我带来了麻烦。从我听说它被用来获得圆角处理旧的IE版本。现在我不再需要它...更糟糕的是,它迫使我保持​​一个< META content = IE = EmulateIE7 http-equiv = X-UA-Compatible> 标签或脚本混淆我不透明的窗口。它似乎自动包含在标签。< b:include data ='blog'name ='all-head-content'/> 任何人知道如何防止它被加载?

解决方案

我终于想到了这一个。



通过替换

 < b:include data = 'name ='all-head-content'/> 

使用

 < meta expr:content ='& quot; text / html; charset =& quot; + data:blog.encoding'http-equiv ='Content-Type'/> 
< meta content ='true'name ='MSSmartTagsPreventParsing'/>
< meta content ='blogger'name ='generator'/>
< link expr:href ='data:blog.homepageUrl +& quot; favicon.ico& quot;'rel ='icon'type ='image / x-icon'/>
< link expr:href ='data:blog.url'rel ='canonical'/>
< data:blog.feedLinks />
< b:if cond ='data:blog.url == data:blog.homepageUrl'>
< link href ='http://www.blogger.com/openid-server.g'rel ='openid.server'/>
< / b:if>

一切正常。



最少对我的博客这产生相同的标题输出比以前(减去两个IE特定的脚本和第三个全局脚本,我不知道)。我已经运行 diff



更新1

如果你想要非IE特定的脚本,只需在Content-Type标签之后添加:

 < script type ='text / javascript'>(function(){var a = window; function c(b){this.t = {}; this.tick = function(b,i,d ){d = d!= void 0?d:(new Date).getTime(); this.t [b] = [d,i]}; this.tick(& quot; start& b)} var e = new c; a.jstiming = {Timer:c,load:e}; try {var g = null; a.chrome& amp; amp; a.chrome.csi& amp; amp; amp; amp;(g = Math.floor(a.chrome.csi()。pageT)); g == null& amp; amp amp; amp; a.gtbExternal& amp; amp; amp; amp ()); g == null& amp; amp; amp; a.external& amp; amp; amp;(g = a.external.pageT); g& amp; amp; amp (b.offsetParent){do f + = b.offsetTop; while(b = b.offsetParent)} b = f(b.offsetParent) ; b& = 750& amp; amp; a.jstiming.load.tick(& aft& quot;)}; var j =!1; function k(){j ||(j = !0,a.jstiming.load.tick(& quot; firstScrollTime& quot;))} a.addEventListener?a.addEventListener(& quot; scroll& quot;,k,!1):a.attachEvent ;onscroll&,k); 
})();< / script>

更新2



这也会删除生成的< link rel =image_src> 。我只是硬编码一个图像。


this script is giving me trouble in IE 9. From what I heard it was used to get rounded corners working on old IE versions. Now I don't need it anymore... And worse, it is forcing me to keep a <META content=IE=EmulateIE7 http-equiv=X-UA-Compatible> tag or the scripts messes my opaque windows. It seems to be included automatically with the <b:include data='blog' name='all-head-content'/> tag. Anyone knows how to prevent it from being loaded?

解决方案

I've finally figured this one out.

By replacing

<b:include data='blog' name='all-head-content'/>

With

<meta expr:content='&quot;text/html; charset=&quot; + data:blog.encoding' http-equiv='Content-Type'/>
<meta content='true' name='MSSmartTagsPreventParsing'/>
<meta content='blogger' name='generator'/>
<link expr:href='data:blog.homepageUrl + &quot;favicon.ico&quot;' rel='icon' type='image/x-icon'/>
<link expr:href='data:blog.url' rel='canonical'/>
<data:blog.feedLinks/>  
<b:if cond='data:blog.url == data:blog.homepageUrl'>
   <link href='http://www.blogger.com/openid-server.g' rel='openid.server'/>
</b:if>

Everything works as expected.

At least for my blog this produces the same header output than before (minus the two IE specific scripts and a third global script which I'm not sure about). I've run diff to be sure.

Update 1

If you want the non IE specific script, just add this after the Content-Type tag:

<script type='text/javascript'>(function() { var a=window;function c(b){this.t={};this.tick=function(b,i,d){d=d!=void 0?d:(new Date).getTime();this.t[b]=[d,i]};this.tick(&quot;start&quot;,null,b)}var e=new c;a.jstiming={Timer:c,load:e};try{var g=null;a.chrome&amp;&amp;a.chrome.csi&amp;&amp;(g=Math.floor(a.chrome.csi().pageT));g==null&amp;&amp;a.gtbExternal&amp;&amp;(g=a.gtbExternal.pageT());g==null&amp;&amp;a.external&amp;&amp;(g=a.external.pageT);g&amp;&amp;(a.jstiming.pt=g)}catch(h){};a.tickAboveFold=function(b){var f=0;if(b.offsetParent){do f+=b.offsetTop;while(b=b.offsetParent)}b=f;b&lt;=750&amp;&amp;a.jstiming.load.tick(&quot;aft&quot;)};var j=!1;function k(){j||(j=!0,a.jstiming.load.tick(&quot;firstScrollTime&quot;))}a.addEventListener?a.addEventListener(&quot;scroll&quot;,k,!1):a.attachEvent(&quot;onscroll&quot;,k);
 })();</script>

Update 2

This also removes the generated <link rel="image_src">. I just hardcoded an image.

这篇关于在Blogger上停用ieretrofit.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆