title: Fiddler: Programmatically add word to Query string
body: <p>Please be kind, I'm  new to Fiddler</p>
  
  <p>My purpose:I want to use Fiddler as a Google search filter</p>
  
  <p><strong>Summary</strong>:</p>
  
  <p>I'm tired of manually adding "dog" every time I use Google.I do not want the "dog" appearing in my search results.</p>
  
  <p>For example:</p>
  
  <p>//www.google.com/search?q=cat<code>+-dog</code></p>
  
  <p>//www.google.com/search?q=baseball<code>+-dog</code></p>
  
  <p><strong>CODE</strong>:</p>
  
  <p><strong><code>dog</code></strong> replaced with <strong><code>-torrent-watch-download</code></strong></p>
  
  <pre><code>// ==UserScript==
  // @name       Tamper with Google Results
  // @namespace  http://superuser.com/users/145045/krowe
  // @version    0.1
  // @description  This just modifies google results to exclude certain things.
  // @match      http://*.google.com
  // @match      https://*.google.com
  // @copyright  2014+, KRowe
  // ==/UserScript==
  
  
  function GM_main () {
      window.onload = function () {
        var targ = window.location;
        if(targ &amp;&amp; targ.href &amp;&amp; targ.href.match('https?:\/\/www.google.com/.+#q=.+') &amp;&amp; targ.href.search("/+-torrent/+-watch/+-download")==-1) {
          targ.href = targ.href +"+-torrent+-watch+-download";
        }
      };
  }
  
  //-- This is a standard-ish utility function:
  function addJS_Node(text, s_URL, funcToRun, runOnLoad) {
      var D=document, scriptNode = D.createElement('script');
      if(runOnLoad) scriptNode.addEventListener("load", runOnLoad, false);
      scriptNode.type = "text/javascript";
      if(text) scriptNode.textContent = text;
      if(s_URL) scriptNode.src = s_URL;
      if(funcToRun) scriptNode.textContent = '(' + funcToRun.toString() + ')()';
      var targ = D.getElementsByTagName('head')[0] || D.body || D.documentElement;
      targ.appendChild(scriptNode);
  }
  
  addJS_Node (null, null, GM_main);
  </code></pre>
  
  <p>At first I was going to go with Tampermonkey userscripts,Because I did not know about Fiddler</p>
  
  <p>==================================================================================</p>
  
  <p>Now,lets focus on Fiddler</p>
  
  <p><strong>Before Request</strong>:</p>
  
  <p>I want Fiddler to add text at the end of <strong>Google</strong> Query string.</p>
  
  <p>Someone suggested me to use</p>
  
  <blockquote>
    <p>static function OnBeforeRequest(oSession: Session) {</p>
  
  <pre><code>    if (oSession.uriContains("targetString")) {
            var sText = "Enter a string to append to a URL";
            oSession.fullUrl = oSession.fullUrl + sText;
      }
  }
  </code></pre>
  </blockquote>
  
  <p><strong>Before Response</strong>:</p>
  
  <p><em>This is where my problem lies</em></p>
  
  <p>I totally love the HTML response,Now I just want to scrape/hide  the word in the search box without changing the search results.How can it be done? Any Ideas?</p>
  
  <p><a href="http://i.stack.imgur.com/4mUSt.jpg" rel="nofollow">http://i.stack.imgur.com/4mUSt.jpg</a></p>
  
  <p>Can you guys please take the above  information and fix the problem for me</p>
  
  <p>Thank you</p>