Created
December 16, 2014 06:45
-
-
Save neocodegs/df81bcf2047d917f9ad7 to your computer and use it in GitHub Desktop.
Fiddler script hide css,js,font
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
| 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