I'm using Fiddler (web debugging tool) and the below code is JScript .NET, which is basically a .NET version of Javascript.
Code:
if (oSession.HostnameIs("www.youtube.com") && oSession.oResponse.headers.ExistsAndContains("Content-Type","text/html")) // oSession is a Fiddler object session
{
oSession.utilDecodeResponse(); // Remove any compression or chunking
oSession.utilReplaceInResponse('<b>','<u>'); // Search and replace in HTML
}
How do I replace youtube video player with this message?
HTML Code:
<div id="player-unavailable" class=" player-width player-height player-unavailable ">
<div class="icon meh"></div>
<div class="content">
<h1 id="unavailable-message" class="message">
This video is no longer available because of inappropriate content.
</h1>
<div id="unavailable-submessage" class="submessage">
Sorry about that.
</div>
</div>
</div>
Thank you