真正的复制帖子没得乱码,用WPS弱暴了
不连接无真相,,,自己去看吧,,,不给加分就不够意思http://www.advertcn.com/archiver/tid-4921.html 传说中的打印版?:lol dfy 发表于 2013-4-7 17:56 static/image/common/back.gif传说中的打印版?
{:2_27:}{:2_27:}{:2_27:}传说 本帖最后由 chenmeiyuan8 于 2013-4-8 00:01 编辑
火狐插件,用猴子
var debug=false;
var CleanHideObj=new CleanHideClass();
function CleanHideClass()
{
this.on=function(id,bMZ)
{
if(id == 0)
{
var page=/* document.getElementById("content").contentDocument */document;
this.RemoveHide(page,"span");
this.RemoveHide(page,"font");
this.RemoveHide(page,"div");
this.RemoveHide(page,"p");
}
}
this.getobjstyle=function(node,prop)
{
try
{
return node.ownerDocument.defaultView.getComputedStyle(node, "").getPropertyValue(prop);
}
catch(e)
{
if(debug)
{
alert(e.message);
}
return "200";
}
}
this.RemoveHide=function(page,objname)
{
try
{
var minValue=15;
var objs=page.getElementsByTagName(objname);
if(objs.length == 0)
{
if(debug)
{
alert("no object found!:"+objname);
}
}
else
{
for(var i=objs.length-1;i>=0;i--)
{
var node=objs.item(i);
if(this.getobjstyle(node,"display") == "none" ||
this.getobjstyle(node,"visibility") =="hidden" ||
parseInt(this.getobjstyle(node,"font-size")) == 0)
{
if(debug)
{
alert("remove invisiable!");
}
node.parentNode.removeChild(node);
}
else
{
if(node.parentNode)
{
var orgNode=node;
var orgColor=this.getobjstyle(orgNode,"color")
var orgRGB=getRGB(orgColor);
var parentNode=node.parentNode
var parentBgColor=this.getobjstyle(parentNode,"background-color");
var isLast=false;
while(parentBgColor == "transparent")
{
if(parentNode.parentNode == null)
{
isLast=true;
break;
}
parentNode=parentNode.parentNode;
parentBgColor=this.getobjstyle(parentNode,"background-color");
if(parentBgColor != "transparent")
{
break;
}
}
if(isLast)
{
if(debug)
{
alert("last!!");
}
if((Math.abs(orgRGB-255)<=minValue)&&(Math.abs(orgRGB-255)<=minValue)&&(Math.abs(orgRGB-255)<=minValue))
{
orgNode.parentNode.removeChild(orgNode);
}
}
else
{
if(debug)
{
alert("compare color and parent bgcolor!");
}
parentBgRGB=getRGB(parentBgColor);
if((Math.abs(orgRGB-parentBgRGB)<=minValue)&&(Math.abs(orgRGB-parentBgRGB)<=minValue)&&(Math.abs(orgRGB-parentBgRGB)<=minValue))
{
orgNode.parentNode.removeChild(orgNode);
}
}
}
}
}
}
var itemFrames = page.getElementsByTagName("frame");
var itemiFrames = page.getElementsByTagName("iframe");
var frame, iframe;
if (itemFrames.length > 0)
{
for (var i = 0 ; i< itemFrames.length ; i++)
{
frame = itemFrames.contentDocument;
this.RemoveHide(frame,objname);
}
}
if (itemiFrames.length > 0)
{
for (var i = 0 ; i < itemiFrames.length ; i++)
{
iframe = itemiFrames.contentDocument;
this.RemoveHide(iframe,objname);
}
}
}
catch(e)
{
if(debug)
{
alert(e.message);
}
}
}
}
function getRGB(colorString)
{
var RGB = new Array;
var tempSting=colorString.substring(4,colorString.length-1);
var tempArray=tempSting.split(",");
RGB=parseInt(tempArray);
RGB=parseInt(tempArray);
RGB=parseInt(tempArray);
return RGB;
}
function keys(evt)
{
if(evt.ctrlKey && evt.keyCode=="81")
{
CleanHideObj.on(0,1);
alert("Clean Hide successfully! Remember Hotkeys: CTRL+Q");
}
}
document.addEventListener('keydown', keys, false);
GM_registerMenuCommand('Clean Hide',
function(e){
CleanHideObj.on(0,1)
alert("Clean Hide successfully! Remember Hotkeys: CTRL+Q");
});
直接使用正则替换掉干扰码
页:
[1]