|
以前还真不知有此IE功能,这样在兼容模式下也能过滤广告了(非所有),看到一个帖子发现了这个新方法,真的不错,感谢原作者。
客观讲,这个过滤广告的效果可能跟ff或者mx有一定的差距,但是这也提供了一个思路,所以特来转帖分享。
一、新建一个ad.css文件,用记事本打开,填入以下内容- /* macd */
- *[src*="xc.macd.cn"],
- /* bios之家 */
- #ad,
- /* 起点 */
- .ibw_tiny_vertical,
- #aspnetForm #mainContent div[class^="gg0"],
- *[name^="ipa_ads_"],
- img[alt="起点广告"],
- #fullAD,
- *[src^="http://cj.qidian.com/svnad/"],
- /* verycd */
- iframe[src^="http://sponsor.verycd.com"],
- .warp-notice .warp-notice2,
- /* allyes */
- *[src*="allyes.cn"],
- *[src*="allyes.com"],
- /* adsame */
- *[src*="adsame.com"],
- /* cntv */
- div[id^="iDNA_cou_"],
- #remotecontrol.remotecontrol,
- .head_adv,
- .cntvhp_head .search,
- .cntvhp_body .adbox,
- embed[src^="http://www.cctv.com/nettv/Library/tongyong/ad/jshow.swf?"],
- .advertis#adver,
- #ssFlashPlayDiv #ssflashID,
- .ADtitle_list,
- .logobar DIV[class^="wrap_i"] .searcharea,
- iframe[src*="a.cntv.cn"],
- /* 酷6 */
- iframe[src*="ku6afp.allyes.com"],
- /* 优酷 */
- object[data^="http://static.atm.youku.com/"],
- img[src^="http://static.atm.youku.com/"],
- iframe[src^="http://cpro.baidu.com/cpro/ui/uijs.php?"],
- iframe[src^="http://smarttrade.allyes.com"],
- /* 绿盟 */
- iframe[src*="www.xdowns.com/gg/"],
- #baidugg,
- a[href^="http://www.moneywise.com.cn/Download/download.aspx?"],
- /* 绿色下载站 */
- #greendown *[class^="content ad-"],
- #greendown *[class^="ad-"],
- #greendown *[src*="/ggao/"],
- #greendown iframe[src="/js/comment_g.html"],
- /* 17173 */
- object[id^="hengtong"],
- a[href^="http://sohu.ad-plus.cn"],
- *[id^="i2IFEP_"],
- .banner960120,
- .banner750120,
- .banner740120,
- .wrapper .bannerTextNew,
- /* 阿里妈妈 */
- *[src*="z.alimama.com"],
- *[src*="a.alimama.cn"],
- /* doubleclick */
- *[src*="doubleclick.net"],
- /* Google广告 */
- *[src*="pagead2.googlesyndication.com"],
- *[src*="www.google-analytics.com"],
- *[src*="googleadsserving.cn"],
- *[src*="partner.googleadservices.com"],
- /* 搜狐 */
- sohuadcode,
- /* 中关村 */
- #hq_float,
- *[id^="Bar16"],
- #Float1265,
- .word_ad,
- .banner760_1,
- .pic_ad,
- .banner760 .adSpace,
- /* discuz论坛 */
- .content #hot,
- .content #modarea,
- .content #ann,
- .subject em,
- .subject .attach,
- .subject .new,
- .threadtags,
- .postbottom,
- #ad_text,
- #ad_headerbanner,
- .ad_footerbanner,
- .ad_column,
- .ad_textlink1,
- .ad_textlink2,
- .forumlinks,
- .forumimglink,
- .forumtxtlink,
- *[class^="ad_float_"],
- /* 远景 */
- #pb_news #pb_n_c,
- #pb_forum #forumheader,
- #viewthread .threadfix #focus,
- .postcontent .node-gg,
- /* 百度 */
- *[src*="cpro.baidu.com"],
- *[src*="eiv.baidu.com"],
- /* 百度贴吧 */
- #pg #m #girl,
- #rightAd,
- #ecomAdDiv,
- .c_post_title .forward,
- #thread_footer .forward,
- .c_post .t,
- .c_post_info .c_author .follow,
- .c_post_info .c_author .follow_male,
- .c_post_info .c_author .follow_female,
- #ec_im_container,
- *[href^="http://www.baidu.com/adrc.php"],
- table[width="65%"][bgcolor="#ebebeb"][style="margin-left: 15px;table-layout:fixed;"],
- /* 天空软件 */
- *[id^="baidu_clb_slot_"],
- /* 华军软件 */
- #wide_ad_unit.wide_ads,
- #lovexin12,
- #lovexin14,
- #content .a970,
- object[width="970"][height="60"],
- *[src*="/newhuagg/"],
- .a-intro object[width="300"][height="200"],
- /* cnbeta */
- #h_right #userInfo,
- #post #comad,
- #foot object,
- #content #AdForward,
- #sideBar #votes #vote_content,
- #sideBar #fm,
- #sideBar #fm_r,
- #c_focusAndHot #c_ad,
- *[src*="u17.com/upload/FCK/image"],
- *[src^="http://img.cnbeta.com/youdao"],
- *[src^="http://img.cnbeta.com/ks576."],
- *[src="http://img.cnbeta.com/gord_300.jpg"],
- *[src="http://img.cnbeta.com/rk3d.gif"],
- #newsBox #news object[width="576"][height="60"],
- #feedback center object[width="300"][height="250"],
- *[id*="google_ads"],
- #wrapper object[width="950"][height="90"],
- a[href*="?from=cnbeta"],
- /* 驱动之家 */
- *[id^="ad_"],
- *[id^="AC_TR86_"],
- *[src*="11.mydrivers.com"],
- table[width="980"][style="border: 1px solid #5A7EA0"][height="90"],
- div[style="padding-top:10px;padding-bottom:3px;"] object[width="468"][height="60"],
- div[style="padding:3px;font-size:0px;"],
- /* 谷歌音乐盒 */
- .ads-absolute,
- /* 太平洋软件 */
- *[src^="http://imgad"][src*=".3conline.com/"],
- div[class^="dlcolse"],
- div[id="ivyPC"][class="wrap"],
- #PcPoPmarket,
- *[href*="click?adid="],
- object[id^="ad"],
- .adv_right1,
- .adv_top,
- .art_adv_bottom_comment,
- .left640 .box2,
- /* 网易 */
- *[id^="i2pd_"],
- div[id^="tcldivtf"],
- *[href^="http://g.163.com/c?AID="],
- .gg *[id^="iframe_banner"],
- .ggarea,
- iframe[src^="http://g.163.com/r?"],
- .rightContent embed[src*="126.net/channel"],
- .bg_endPage,
- .header .gg,
- #ead_ad_14,
- .gg360,
- .gg200x300,
- .endYoDao,
- .gg560,
- .colL .gg590,
- .theme-tl .links .chl,
- #divwelcome .part-sec,
- .gIbx-tablayout *[id*="FakeLetterDiv"],
- .blkTopGoogleSearch,
- #conBody .sidebar .HSpace_10,
- .RtTxtAD,
- #conBody .sidebar .adNone,
- #conBody object[width="950"][height="40"],
- .Ad_01,
- .qyfwBlk,
- /* 新浪 */
- #SteamMediaWrap,
- #CoupletMediaWrap,
- .MIB_mbloglist .tipsBox,
- div[class^="missionBox s_bg"],
- div[class="widgetIntroduce widgetH2"],
- *[src^="http://d"][src*=".sina.com.cn"],
- IFRAME[src*="sina.com.cn/iframe/"],
- #seIfm,
- #page .topads,
- #vlog .AD355125,
- *[id^="i2AS_container_div_"],
- *[id^="FullScreen"],
- *[id*="_AdSame_"],
- .grid-640 .adBlock,
- .topAD,
- *[id^="flashcontent_"],
- object[id*="_swf"],
- .MIB_mbloglist .PY_clew,
- /* 凤凰网 */
- #topBj *[id^="ad"],
- #topBj .areaAd,
- #topBj #flashad,
- #topBj #VideoPlayer,
- #topBj .pic660,
- #topBj #StreamMediaWrap,
- *[id^="i2PT_"],
- #StreamMediaWrap #smExtObj,
- #StreamMediaWrap #smTagObj,
- object[id^="flashad"],
- #final_head_ad,
- #main_right .right_picAd,
- #main_right DIV[class^="adlist"],
- IFRAME[src*="all_content_ad_"],
- IFRAME[src="http://book.ifeng.com/special/90niandai/blog3/"],
- .ad_pic,
- .ad_text,
- #main_left .maidunbox,
- .ad950,
- /* 腾讯网 */
- *[src^="http://ads"][src*=".qq.com"],
- .AdTop-Article-QQ,
- #AdRight-Article-QQ,
- #sideBars #News_F_UpRight,
- .business-Article-QQ,
- .AdBox-Article-QQ,
- .qiye-Article-QQ,
- #QQ_Right_button1,
- #QQCOM_Width2,
- #QQCOM_Width3,
- #QQCOM_Button2,
- .adArea #charge_content,
- #tipsAll #tipswindow,
- div[id="tipsAll"][class="tipwindow"],
- #soAdSwf,
- #cssSkin DIV[id^="div_kkkl"],
- #cssSkin DIV[id^="div_nike"],
- *[src*="http://mat1.gtimg.com/worldcup/20100506/27_60_100609.jpg"],
- .ad_article_box,
- #sideBars embed[id="flash_focus"],
- /* 115网盘 */
- div[class="publicize"][style="width:100%; height:90px;"],
- .box .box-inner .row .down-r,
- /* 天涯 */
- *[id^="adsp_"][id*="_banner"],
- *[id^="adsp_content_replybox_img_"]
- {display:none !important}
- /* ==================== 以下代码需IE9才支持 ==================== */
- /* google */
- #gsr #center_col #tads:nth-child(1),
- #gsr #cnt #rhs:nth-child(3),
- /* 百度贴吧 */
- .c_post_info .c_author li:nth-child(2),
- .c_post:nth-child(n+4) .c_post_title
- {display:none !important}
复制代码 二、打开“Internet选项”,点击“辅助功能”,勾选“使用样式表编排文档格式”,选中ad.css,确定,好了,远景以及很多Discuz论坛的广告是不是都看不到了?
本方法适用于IE9,部分适用于IE8(有些站点可能无效),更早的版本请大家自己测试。【亲测ie8有效,但是可能不是全部有效】
附:如果你想把所有网页的字体都强制改为雅黑,可以在代码的开头或最后加入一行:- *{font-family:微软雅黑 !important}
复制代码 |
|