Error en la política de seguridad de contenido en la creación de extensiones de Google Chrome

Estoy creando una extensión de Chrome que abrirá todos los enlaces de una página en nuevas pestañas.

Aquí están mis archivos de código:

manifest.json

{
  "name": "A browser action which changes its icon when clicked.",
  "version": "1.1",
    "permissions": [
    "tabs", "<all_urls>"
  ],
 "browser_action": {     
    "default_title": "links",      // optional; shown in tooltip
    "default_popup": "popup.html"        // optional
  },
 "content_scripts": [
    {
    "matches": [ "<all_urls>" ],
      "js": ["background.js"]
    }
  ],
  "manifest_version": 2
}

popup.html

<!doctype html>
<html>
  <head>
    <title>My Awesome Popup!</title>
    <script>
function getPageandSelectedTextIndex() 
  { 
    chrome.tabs.getSelected(null, function(tab) { 
    chrome.tabs.sendRequest(tab.id, {greeting: "hello"}, function (response) 
    { 
        console.log(response.farewell); 
    }); 
   }); 
        } 
chrome.browserAction.onClicked.addListener(function(tab) { 
        getPageandSelectedTextIndex(); 
});
         </script>
  </head>
  <body>
    <button onclick="getPageandSelectedTextIndex()">
      </button>
  </body>
</html>

background.js

chrome.extension.onRequest.addListener(
  function(request, sender, sendResponse) {
    console.log(sender.tab ?
                "from a content script:" + sender.tab.url :
                "from the extension");
    if (request.greeting == "hello")
    updateIcon();  

});
function updateIcon() {
  var allLinks = document.links;
  for (var i=0; i<allLinks.length; i++) {
    alllinks[i].style.backgroundColor='#ffff00';

}
}

Inicialmente quería resaltar todos los enlaces en la página o marcarlos de alguna manera; pero me aparece el error "Se niega a ejecutar el script en línea debido a la Política de seguridad del contenido".

Cuando presiono el botón dentro de la ventana emergente, aparece este error:Refused to execute inline event handler because of Content-Security-Policy.

Ayúdame a corregir estos errores, para poder abrir todos los enlaces en nuevas pestañas usando mi extensión de Chrome.

Respuestas a la pregunta(1)

Su respuesta a la pregunta