1
1
var doIntegrate = function (integrate) {
2
2
chrome.tabs.getCurrent (function (tab) {
3
chrome.extension.sendMessage ({tabId: tab.id, method: "on_user_infobar_request_result", integrate: integrate}
3
chrome.runtime.sendMessage ({tabId: tab.id, method: "on_user_infobar_request_result", integrate: integrate}
4
4
, function (response) {});
9
9
window.onload = function () {
10
var bg = chrome.extension.getBackgroundPage();
11
document.getElementById('notintegrate').onclick = function () { doIntegrate(false); };
12
document.getElementById('integrate').onclick = function () { doIntegrate(true); };
13
chrome.tabs.getCurrent (function (tab) {
14
if (!bg|| !bg.background_page) {
18
var msg = bg.background_page.getMessageForTabId(tab.id);
23
document.getElementById ('content').style.display = "block";
24
document.getElementById ('message').innerHTML = msg || "";
10
chrome.runtime.getBackgroundPage(function (bg) {
11
document.getElementById('notintegrate').onclick = function () { doIntegrate(false); };
12
document.getElementById('integrate').onclick = function () { doIntegrate(true); };
14
chrome.tabs.getCurrent (function (tab) {
15
if (!bg|| !bg.background_page) {
19
var msg = bg.background_page.getMessageForTabId(tab.id);
24
document.getElementById ('content').style.display = "block";
25
document.getElementById ('message').innerHTML = msg || "";