-
Notifications
You must be signed in to change notification settings - Fork 0
/
background.js
27 lines (25 loc) · 995 Bytes
/
background.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Handle requests for passwords
chrome.runtime.onMessage.addListener(function(request) {
if (request.type === 'file_jira') {
chrome.tabs.create({
url: chrome.extension.getURL('dialog.html'),
active: false
}, function(tab) {
// After the tab has been created, open a window to inject the tab
chrome.windows.create({
tabId: tab.id,
focused: true
}, function(win) {
// console.log("title: " + request.title);
// console.log("descr: " + request.descr);
// console.log("author: " + request.author);
// console.log("time: " + request.reporttime);
chrome.tabs.sendMessage(tab.id, {action: "populate_jira_fields",
title: request.title,
descr: request.descr,
author: request.author,
reporttime: request.reporttime});
});
});
}
});