1
0
mirror of https://github.com/nileshtrivedi/better synced 2025-01-28 12:10:25 +01:00

15 lines
502 B
JavaScript
Raw Permalink Normal View History

let input = document.getElementById('betterSourceText');
let submit = document.getElementById('betterSourceSubmit');
submit.addEventListener('click', function() {
2020-08-02 23:04:43 +05:30
chrome.storage.sync.set({betterSourceURL: input.value}, function() {
2020-08-02 23:30:38 +05:30
console.log('Set betterSource = ' + input.value);
});
chrome.runtime.sendMessage({type: 'reloadList', url: input.value}, (response) => {
if (response) {
console.log("BETTER_ALTERNATIVES list is reloaded");
}
});
});