..... // You can create a custom menu like so: /* QuickLinkMenu("&Links") QuickLinkItem("IE GeoLoc TestDrive", "http://ie.microsoft.com/testdrive/HTML5/Geolocation/Default.html") QuickLinkItem("FiddlerCore", "http://fiddler2.com/fiddlercore") public static function DoLinksMenu(sText: String, sAction: String) { Utilities.LaunchHyperlink(sAction); } */
/* 显示请求耗时 */ functionBeginRequestTime(oS: Session) { if (oS.Timers != null) { return oS.Timers.ClientBeginRequest.ToString(); } returnString.Empty; } public static BindUIColumn("TimeTaken") functionCalcTimingCol(oS: Session){ var sResult = String.Empty; if ((oS.Timers.ServerDoneResponse > oS.Timers.ClientDoneRequest)) { sResult = (oS.Timers.ServerDoneResponse - oS.Timers.ClientDoneRequest).ToString(); } return sResult; } /* 显示客户端请求时间 */ functionStartRequestTime(oS: Session) { if (oS.Timers != null) { return oS.Timers.ClientBeginRequest.ToString(); } returnString.Empty; } public static BindUIColumn("Start") functionShowStartRequestTime(oS: Session){ var sResult = String.Empty; if ((oS.Timers.ClientDoneRequest != null)) { sResult = oS.Timers.ClientDoneRequest.ToString(); } return sResult; } public static RulesOption("Hide 304s") BindPref("fiddlerscript.rules.Hide304s") var m_Hide304s: boolean = false;
.........
/* static function OnDetach() { MessageBox.Show("Fiddler is no longer the system proxy"); } */
// The Main() function runs everytime your FiddlerScript compiles staticfunctionMain() { var today: Date = newDate(); /* 添加ip列 */ FiddlerObject.UI.lvSessions.AddBoundColumn("ServerIP", 120, "X-HostIP"); FiddlerObject.StatusText = " CustomRules.js was loaded at: " + today;
// Uncomment to add a "Server" column containing the response "Server" header, if present // UI.lvSessions.AddBoundColumn("Server", 50, "@response.server");
// Uncomment to add a global hotkey (Win+G) that invokes the ExecAction method below... // UI.RegisterCustomHotkey(HotkeyModifiers.Windows, Keys.G, "screenshot"); }