title: Chrome Extension Manifest permissions
body: <p>This is my first chrome Extension.</p>
  
  <p>I basically have already written a html file that has a javascript file to go along with it. I've noticed that apparently you have to put the javascript as a separate file to the html file. That's fine. Did that. Referenced it in the html header.</p>
  
  <p>But I'm not sure how to setup the manifest file to be able to use the javascript on my popup html page.</p>
  
  <p>the javascript does not use jquery. it's pure javascript.</p>
  
  <p>I'm not sure what Required or Optional Permissions I have to include in the manifest if any. So far all I know is that I might have to include "clipboardRead" permission in there.</p>
  
  <p>Or am I meant to be using content_scripts instead in the manifest.</p>
  
  <p>this is my manifest.</p>
  
  <pre><code>{
    "manifest_version": 2,
  
    "name": "PhotoTagger",
    "description": "This extension helps you create your hashtags for your posts, quickly.",
    "version": "1.0",
  
    "content_scripts": [
      {
        "matches": ["&lt;all_urls&gt;"],
        "js": ["PhotoTagger.js"]
      }
    ],
  
    "permissions": [
      "clipboardRead",
    ],
  
    "browser_action": {
      "default_icon": "icons/Google-plus-19x19.png",
      "default_popup": "PhotoTagger.html"
    }
  }
  </code></pre>
  
  <p>and a sample function in my javascript is this (PhotoTagger.js):</p>
  
  <pre><code>function selectText(containerid) {
      if (document.selection) {
          var range = document.body.createTextRange();
          range.moveToElementText(document.getElementById(containerid));
          range.select();
      } else if (window.getSelection) {
          var range = document.createRange();
          range.selectNode(document.getElementById(containerid));
          window.getSelection().addRange(range);
      }
  }
  </code></pre>
  
  <p>and this is a sample snippet of my html calling the Js function:</p>
  
  <pre><code>&lt;li id="#Sydney" onclick="selectText('#Sydney')"&gt;
      &lt;input id="al2" type="checkbox" value="#Sydney +104262770460851770269"/&gt;
      #Sydney&lt;/li&gt;
  </code></pre>
  
  <p>really appreciate any help I can get.</p>
  
  <p>Also to mention the html works fine on an opened tab in chrome. just doesn't work when I run it as an extension.</p>