Skip to content

Instantly share code, notes, and snippets.

@neocodegs
Created December 16, 2014 06:45
Show Gist options
  • Select an option

  • Save neocodegs/df81bcf2047d917f9ad7 to your computer and use it in GitHub Desktop.

Select an option

Save neocodegs/df81bcf2047d917f9ad7 to your computer and use it in GitHub Desktop.
Fiddler script hide css,js,font
public static RulesOption("Hide CSS")
BindPref("fiddlerscript.rules.HideCSS")
var m_HideCSS: boolean = true;
public static RulesOption("Hide JavaScript")
BindPref("fiddlerscript.rules.HideJavaScript")
var m_HideJavascript: boolean = true;
public static RulesOption("Hide Font")
BindPref("fiddlerscript.rules.HideFont")
var m_HideFont: boolean = false;
static function OnBeforeResponse(oSession: Session) {
if (m_Hide304s && oSession.responseCode == 304) {
oSession["ui-hide"] = "true";
}
if (m_HideCSS && oSession.oResponse.headers.ExistsAndContains("Content-Type", "text/css") )
{
oSession["ui-hide"] = "true";
}
if (m_HideJavascript && oSession.oResponse.headers.ExistsAndContains("Content-Type", "javascript") )
{
oSession["ui-hide"] = "true";
}
if (m_HideFont && oSession.oResponse.headers.ExistsAndContains("Content-Type", "x-font-woff") )
{
oSession["ui-hide"] = "true";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment