|
想提高Google Adsense中Firefox推广广告的收入吗?可以试试这样的方法!<br /><br />打开后,在浏览器顶部会有一个模仿IE自带的黄色警告条,比较醒目。点过以后就不会再出现了,除非客户端删除cookie。据说这样推广forefox效果非常好,我就抄过来试试看,不敢独享,公布出来:<br /><br />把下面的内容保存为firefox.js<br /><br />----------------BEGIN-----------------------<br /><br />// This function does the actual browser detection<br />function writeCookie(name, value, hours)<br />{<br /> var expire = "";<br /> if(hours != null)<br /> {<br /> expire = new Date((new Date()).getTime() + hours * 3600000);<br /> expire = "; expires=" + expire.toGMTString();<br /> }<br /> document.cookie = name + "=" + escape(value) + expire;<br />}<br /><br />// Example:<br />// alert( readCookie("myCookie") );<br />function readCookie(name)<br />{<br /> var cookieValue = "";<br /> var search = name + "=";<br /> if(document.cookie.length > 0)<br /> {<br /> offset = document.cookie.indexOf(search);<br /> if (offset != -1)<br /> {<br /> offset += search.length;<br /> end = document.cookie.indexOf(";", offset);<br /> if (end == -1) end = document.cookie.length;<br /> cookieValue = unescape(document.cookie.substring(offset, end))<br /> }<br /> }<br /> return cookieValue;<br />}<br /><br /><br /><br />function hasIE_hasIE() {<br />var ua = navigator.userAgent.toLowerCase();<br />return ((ua.indexOf('msie') != -1) && (ua.indexOf('opera') == -1) && <br /> (ua.indexOf('webtv') == -1) &&<br /> (location.href.indexOf('seenIEPage') == -1));<br />}<br /><br />function hasIE_showLayer(whichLayer)<br />{<br />if (document.getElementById)<br /> {<br /> var style2 = document.getElementById(whichLayer).style;<br /> style2.display = "block";<br /> }<br />else if (document.all)<br /> {<br /> var style2 = document.all[whichLayer].style;<br /> style2.display = "block";<br /> }<br />else if (document.layers)<br /> {<br /> var style2 = document.layers[whichLayer].style;<br /> style2.display = "block";<br /> }<br />}<br /><br />// Hides and shows sections of the page based on whether or not it's<br />// running in IE<br />function hasIE_hideAndShow()<br />{<br />if (hasIE_hasIE())<br />{<br /> hasIE_showLayer("hasIE_level1"); <br />}<br />else{}<br />}<br /><br />function hasIE_ContinueWithoutFF() {<br /> if (location.href.indexOf('?') != -1)<br /> location.href += '&seenIEPage=1';<br /> else<br /> location.href += '?seenIEPage=1';<br />}<br />function closediv(i) {<br /> writeCookie("status","showed24",240);<br /> document.getElementById(i).style.display='none'; <br />}<br /><br />document.write("<table id=\"hasIE_level1\" style='display:none;clear:both;line-height:100%;' height=\"22\" width=\"100%\" cellspacing=0 cellpadding=0 border=0><tr><td><div style=\"background:#FFFFBB; text-align: center; padding:2px 0 3px; border-bottom:1px solid #ffd532;position:absolute; top:0; left:0; width:100%; z-index:100\"><div id=\"iewarning\" style=\"width:19px; float:left;\"><img align=\"absmiddle\" src=\"\" border=\"0\" /></div><div id=\"closeimg\" style=\"width:19px; float:right;\"><a href=\"javascript:closediv('hasIE_level1');\" title=\"关闭提示\"><img src=\"\" align=\"absmiddle\" border=\"0\" /></a></div><div style=\" margin-top:4px;marign-left:4px;font-size:12px;color:#092E20\">发现您正在使用老掉牙的IE浏览器,强烈推荐您在 Windows 操作系统中使用最安全的浏览器: <a href=\"http://www.******.net/AD/Firefox/firefox.html\" title=\"FireFox火狐浏览器2.0下载\" target=\"_blank\"><font color=\"#ee0000\">FireFox火狐浏览器2.0,点击下载</a></font> !</div></div><div style=\"clear:both\"></div></td></tr></table>"); <br /><br />if(document.referrer.indexOf("hao123")==-1 && document.referrer.indexOf("hao222")==-1)<br />{<br /> if(readCookie("status") != "showed24")<br /> {<br /> hasIE_hideAndShow();<br /> }<br />}<br /><br />----------------END------------------------------- |
|