Last active
April 8, 2025 09:04
-
-
Save Aldaviva/6d15d5bb8180196b2e7d7d59dcd1169a to your computer and use it in GitHub Desktop.
Hide useless Fiddler clutter that doesn't remember its visibility: Get Started and Fiddler Orchestra Beta tabs and Composer history pane
This file contains hidden or 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
/* | |
* Features: Hide the Get Started tab, Fiddler Orchestra Beta tab, and Composer history pane, which don't remember their visibility across Fiddler restarts | |
* Installation: Add these members to the Handlers class in %USERPROFILE%\Documents\Fiddler2\Scripts\CustomRules.js | |
*/ | |
class Handlers { | |
// If you already have an OnBoot() method, you'll want to combine it with this, or rename this and call it from yours. | |
static function OnBoot() { | |
var timer = new Timer(); | |
timer.add_Tick(OnLateBoot); | |
timer.Interval = 25; | |
timer.Enabled = true; | |
Fiddler.FiddlerObject.UI.pageBuilder.add_ControlAdded(OnComposerLoaded); | |
} | |
static function OnLateBoot(sender: Object, eventArgs: EventArgs) { | |
var controls = Fiddler.FiddlerObject.UI.tabsViews.Controls; | |
if (controls.Count >= 10) { | |
sender.Enabled = false; | |
var controlsEnumerator = controls.GetEnumerator(); | |
var controlsToRemove = new Array(); | |
var controlsToRemoveLength = 0; // Array.Length is broken in Fiddler JScript and always returns undefined | |
while (controlsEnumerator.MoveNext()) { | |
var control: Control = controlsEnumerator.Current; | |
if (control.Text == "Get Started" || control.Text == "Fiddler Orchestra Beta") { // TODO not localized, but the keys/names are empty so we have to match on user-facing text | |
controlsToRemove[controlsToRemoveLength++] = control; | |
} | |
} | |
for (var index = 0; index < controlsToRemoveLength; index++) { | |
controls.Remove(controlsToRemove[index]); | |
} | |
} | |
} | |
static function OnComposerLoaded(sender: Object, args: ControlEventArgs) { | |
((SplitContainer) (sender.Controls[0].Controls[0].Controls[0].Controls[0])).Panel2Collapsed = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Useful for debugging Forms control tree: