I have a very small Google Chrome Extension that uses Google Feed API to grab some data.
但问题是访问者无法点击任何链接。我想知道如何解决这个问题。基本上,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>
答案 0 :(得分:2)
将<base target="_blank" />
放入弹出式广告<head>
。
答案 1 :(得分:1)
你的弹出窗口没有头脑。或<html>
标签。使他们。
然后添加
<base target="_blank" />
在<head>