Created
January 6, 2016 14:29
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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