mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-19 21:46:19 +00:00
23 lines
604 B
JavaScript
23 lines
604 B
JavaScript
import { getShortifyData } from "./common.js";
|
|
|
|
const saveButton = document.body.querySelector("#save-button");
|
|
const domainInput = document.body.querySelector("#domain-input");
|
|
const openIdInput = document.body.querySelector("#openid-input");
|
|
|
|
saveButton.addEventListener("click", () => {
|
|
chrome.storage.local.set({
|
|
shortify: {
|
|
domain: domainInput.value,
|
|
openId: openIdInput.value,
|
|
},
|
|
});
|
|
});
|
|
|
|
(async () => {
|
|
const shortifyData = await getShortifyData();
|
|
if (shortifyData) {
|
|
domainInput.value = shortifyData.domain;
|
|
openIdInput.value = shortifyData.openId;
|
|
}
|
|
})();
|