title: Show widget only on specific url
body: <p>I have a script in the footer of a site. I want the widget to be shown if url contains 'mystring', and if not, then not to be shown</p>
  <pre><code>&lt;script&gt;
      if (window.location.href.indexOf(&quot;mystring&quot;) &gt; -1) {
          &lt;script type=&quot;text/javascript&quot; src=&quot;https://vk.com/js/api/openapi.js?169&quot;&gt;&lt;/script&gt;
          &lt;!-- VK Widget --&gt;
          &lt;div id=&quot;vk_community_messages&quot;&gt;&lt;/div&gt;
          &lt;script type=&quot;text/javascript&quot;&gt;
          if($(window).width()&gt;800) { 
          VK.Widgets.CommunityMessages(&quot;vk_community_messages&quot;, 203651941, {expandTimeout: &quot;20000&quot;,tooltipButtonText: &quot;Any Question?&quot;});
          }
          if($(window).width()&lt;=800) {
          VK.Widgets.CommunityMessages(&quot;vk_community_messages&quot;, 203651941, {tooltipButtonText: &quot;Any Question?&quot;});
          }}
  &lt;/script&gt;
  </code></pre>
  <p>This code produces the following errors:</p>
  <blockquote>
  <p>Uncaught SyntaxError: Unexpected identifier (string 3)</p>
  <p>Uncaught SyntaxError: Unexpected token '}' (string 12)</p>
  </blockquote>