官方文档
https://docs.telerik.com/fiddler/knowledgebase/fiddlerscript/customizesessionslist
在列中添加图像尺寸信息(全局范围)
注意:必须在 Tools > Fiddler Options > Extensions > References 内添加 System.drawing.dll.
代码语言:javascript复制class Handlers
{
// 在列中添加图像尺寸信息
public static BindUIColumn("ImageSize", 60)
function FillImageSizeColumn(oS: Session){
if ((oS.oResponse != null) && (oS.oResponse.headers != null))
{
try{
if (!oS.oResponse.headers.ExistsAndContains("Content-Type", "image/")) return "NotAnImage";
var oMS: System.IO.MemoryStream = new System.IO.MemoryStream(oS.responseBodyBytes);
var i:System.Drawing.Bitmap = new System.Drawing.Bitmap(oMS);
return (i.Width " * " i.Height);
}
catch(e) { return "GetSizeError"; }
}
return String.Empty;
}
}