1234567891011121314151617181920 |
- browser.storage.sync.get().then(function(settings) {
- if(settings.domain) {
- document.getElementById("instance").value = settings.domain;
- }
- if(settings.keeptweet) {
- document.getElementById("keeptweet").checked = true;
- }
- });
- document.getElementById("statusform").onsubmit = function(e) {
- e.preventDefault();
- browser.storage.sync.set({
- domain:document.getElementById("instance").value,
- keeptweet:document.getElementById("keeptweet").checked
- }).then(function() {
- browser.tabs.getCurrent().then(function(data) {
- browser.tabs.remove(data.id);
- });
- });
- }
|