Page 1 of 1

求助,如何过滤网页中的FLASH

Posted: Oct 25 2011, 11:03
by wwwwa
http://www.tianya.cn/publicforum/conten ... 5614.shtml
左边有1个FLASH广告,如何 写规则去掉,谢谢,其代码

Code: Select all

var adsp_content_left_banner = document.getElementById("adsp_content_left_banner");
    if (adsp_content_left_banner) { } else if (0) { /* PROX: Ad Function II Blocked - (AdKey.3 google_adsense_code_4) */ 
      adsp_content_left_banner.style.display = "none";
      google_adsense_code_4=""; 
    }
            var centerSWF = document.createElement("embed");
            centerSWF.style.position = "absolute";
            centerSWF.style.left = 0;
            centerSWF.type = "pplication/x-shockwave-flash";
            centerSWF.width = "120";
            centerSWF.height = "600";
            centerSWF.src = "http://801.tianyaui.com/res/2011/1018/1318918218452.swf";
            centerSWF.setAttribute("wmode", "transparent");
            
            var centerDiv = document.createElement("div");
            centerDiv.style.position = "absolute";
            centerDiv.style.left = "10px";
            centerDiv.style.top = "10px";
            centerDiv.style.zIndex = "100";
            centerDiv.style.textAlign = "right";

          var closeLink = document.createElement("img");
          closeLink.src = "http://static.tianyaui.com/img/static/2008/tygg/c120.jpg";
          closeLink.setAttribute("id", "adsp_content_left_close_btn");
          closeLink.style.cursor = "pointer"; 

            var tarLink = document.createElement("a");
            tarLink.href = "http://807.tianya.cn/count?t=7jOCNeeayNhxRcWvnTsG&backurl=http://gamety.tianya.cn/gamead/sxd/2011/10/17/264131.shtml";
            tarLink.target = "_blank";

            var maskDiv = document.createElement("div");
            maskDiv.style.position = "relative";
            maskDiv.style.left = 0;
            maskDiv.style.right = 0;
            maskDiv.style.top = -22;
            maskDiv.style.width = "120px";
            maskDiv.style.height = "600px";
            maskDiv.style.zIndex = "10";
            maskDiv.style.backgroundColor = "#FFFFFF"
            maskDiv.style.opacity = "0";
            try { maskDiv.style.filter = "alpha(opacity=0)"; } catch (e) { }
            maskDiv.style.cursor = "pointer";
            tarLink.appendChild(maskDiv);

            var parentDiv = document.createElement("div");
            parentDiv.style.position = "relative";
            parentDiv.style.display = "block";
            parentDiv.style.width = "120px";
            parentDiv.style.height = "600px";
            parentDiv.appendChild(centerSWF);
            parentDiv.appendChild(tarLink);
            parentDiv.appendChild(closeLink);

            centerDiv.appendChild(parentDiv);

Re: 求助,如何过滤网页中的FLASH

Posted: Oct 25 2011, 11:24
by ddbb
里面有很明显的KEY了.....

adsp_content_left_banner

Re: 求助,如何过滤网页中的FLASH

Posted: Oct 25 2011, 14:12
by wwwwa
这个 FLASH似乎是用代码动态生成的,能用Proxomitron阻止吗?

Re: 求助,如何过滤网页中的FLASH

Posted: Oct 25 2011, 23:10
by cre
直接阻止那个js不就行了?

Code: Select all

http://bypass..806.tianya.cn/display?f=develop&g=pageinside&alladv=allbbs
瞧你贴的....还故意删掉注释?


最佳方案

Code: Select all

[Patterns]
Name = "Text Mark Tianya [11.10.25]"
Active = TRUE
URL = "[^.]+.tianya.cn"
Limit = 5120
Match = "$NEST(<!--Start 广告系统代码 -->,<!--End 广告系统代码 -->)"