Skip to content

Instantly share code, notes, and snippets.

@ericlaw1979
Created January 6, 2016 14:29
Show Gist options
  • Save ericlaw1979/b154f430a1772419156a to your computer and use it in GitHub Desktop.
Save ericlaw1979/b154f430a1772419156a to your computer and use it in GitHub Desktop.
This FiddlerScript autosizes the width of the Web Sessions list based on whether it contains focus. Adjust width constants to taste.
// Click Rules > Customize Rules
// Inside your existing onboot handler, add two lines:
static function OnBoot() {
FiddlerApplication.UI.pnlSessions.add_Enter(panelEnter);
FiddlerApplication.UI.pnlSessions.add_Leave(panelExit);
// Just before that method in the Handlers class, add:
public static
RulesOption("AutoSizeUI")
BindPref("fiddlerscript.AutoSizeUI")
var m_AutoSizeUI: boolean;
static function panelEnter(o: Object, ea: EventArgs)
{
if (!m_AutoSizeUI) return;
if ((FiddlerApplication.UI.pnlSessions.Width <= 700) &&
(FiddlerApplication.UI.Width > 720))
{
FiddlerApplication.UI.pnlSessions.Width = 700;
}
}
static function panelExit(o: Object, ea: EventArgs)
{
if (!m_AutoSizeUI) return;
if (FiddlerApplication.UI.pnlSessions.Width > 650)
{
FiddlerApplication.UI.pnlSessions.Width = 60;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment