【发布时间】:2014-02-11 22:12:25
【问题描述】:
我正在使用 Google Chrome 扩展程序,我只想知道如何将当前选项卡的描述和 url 图片存储在变量中。
我已经用这些说明存储了网址和标题:
chrome.tabs.getSelected(null, function(tab) {
document.getElementById('currentLink').innerHTML = tab.url;
});
chrome.tabs.getSelected(null, function(tab) {
document.getElementById('currentTitle').innerHTML = tab.title;
});
但仍然无法像这样存储来自balise meta的描述和url图片:
<meta name="description" content="Le Monde.fr - 1er site d'information. Les articles du journal et toute l'actualité en continu : International, France, Société, Economie, Culture, Environnement, Blogs ...">
<meta property="og:image" content="http://s1.lemde.fr/medias/web/1.2.639/img/placeholder/opengraph.jpg">
【问题讨论】:
-
您能否提供更多详细信息,例如您正在使用的网站?网址图片是什么意思?
标签: javascript google-chrome-extension google-chrome-devtools