mirror of
https://github.com/nileshtrivedi/better
synced 2025-01-01 07:57:24 +01:00
15 lines
502 B
JavaScript
15 lines
502 B
JavaScript
let input = document.getElementById('betterSourceText');
|
|
let submit = document.getElementById('betterSourceSubmit');
|
|
|
|
submit.addEventListener('click', function() {
|
|
chrome.storage.sync.set({betterSourceURL: input.value}, function() {
|
|
console.log('Set betterSource = ' + input.value);
|
|
});
|
|
|
|
chrome.runtime.sendMessage({type: 'reloadList', url: input.value}, (response) => {
|
|
if (response) {
|
|
console.log("BETTER_ALTERNATIVES list is reloaded");
|
|
}
|
|
});
|
|
});
|