我正在嘗試創建一個Firefox插件,它爲頁面上的電話號碼提供了超鏈接。 代碼:使用Firefox插件更新標籤內容
tabs.on('ready', function(tab) {
tab.attach({
contentScript: 'self.postMessage(document.body.innerHTML);',
onMessage: function (message) {
html = updatePhonenumber(message);
}
});
});
如何更新標籤與編輯的內容