在Chrome扩展中打开链接

问题描述:

I have a very small Google Chrome Extension that uses Google Feed API to grab some data.在Chrome扩展中打开链接

但问题是游客无法点击任何链接。我很想知道如何解决这个问题。基本上,popup.html中的任何链接都不在新选项卡中打开。

我们的manifest.json,popup.html和3图标文件

这里是我的manifest.json

{ 
    "name": "Gujarati Suvichar", 
    "version": "0.0.1", 
    "description": "Gujarati Suvichar from GujaratiSuvichar.com", 
    "icons": { "16": "gujarat - 16.jpg", 
      "48": "gujarat - 48.jpg", 
      "128": "gujarat - 128.jpg" }, 
    "browser_action": { 
    "default_icon": "gujarat.jpg", 
    "popup": "popup.html" 
    } 
} 

这里是popup.html实际代码

<style> 
body { 
    min-width:350px; 
    height:100px; 
    overflow-x:hidden; 
} 
#footer { 
    color: #F30; 
} 
#footer a{ 
    color: #F30; 
} 
</style> 
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> 
<script src="http://www.google.com/jsapi?key=AIzaSyA5m1Nc8ws2BbmPRwKu5gFradvD_hgq6G0" type="text/javascript"></script> 
    <body style="font-family: Arial;border: 0 none;"> 
    <script type="text/javascript"> 
    /* 
    * How to use the Feed Control to grab, parse and display feeds. 
    */ 

    google.load("feeds", "1"); 

    function OnLoad() { 
     // Create a feed control 
     var feedControl = new google.feeds.FeedControl(); 

     // Add two feeds. 
     feedControl.addFeed("http://www.gujaratisuvichar.com/feed", "Gujarati Suvichar"); 

     // Draw it. 
     feedControl.draw(document.getElementById("content")); 
    } 
    google.setOnLoadCallback(OnLoad); 
    </script> 

    <div id="header"> 
     <div class="container"> 
     <h1>ગà«àªœàª°àª¾àª¤à«€ સà«àªµàª¿àªšàª¾àª°</h1> 
     </div> 
    </div> 
<style> 
.gf-result .gf-author, .gf-result .gf-spacer, .gf-result .gf-relativePublishedDate { 
    display: none; 
} 
.gfc-result .gf-title a{ 
    text-decoration:none; 
    color:#CCC 
} 
</style>  
    <div id="content"> 
    <div id="content">Loading...</div> 
    </div> 

    <div id="footer"> 
    <span id="footer">More on <a href="http://www.gujaratisuvichar.com/">GujaratiSuvichar.com</a></span> </div> 
</body> 

<base target="_blank" />放入弹出的<head>

+0

我没有,但似乎并没有工作:( – Chirag

+0

@Chirag是它创造的iframe的内容DIV中?或者倾倒HTML就在那里? – serg

您的弹出窗口没有头部。或<html>标签。使他们。 然后添加 <base target="_blank" /> 在你<head>