17 lines
605 B
JavaScript
17 lines
605 B
JavaScript
chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
|
|
document.getElementById('lastCallDate').textContent = message.date;
|
|
document.getElementById('result').textContent = message.result;
|
|
|
|
return false;
|
|
});
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
// Get last call URL date and result
|
|
chrome.runtime.sendMessage({ type: 'sendState' });
|
|
|
|
// Add event listener to call URL button
|
|
document.getElementById('callURLBtn').addEventListener('click', function () {
|
|
chrome.runtime.sendMessage({ type: 'callURLManually' });
|
|
});
|
|
});
|