Files
SCBao/background.js
T
2025-01-16 17:35:02 +08:00

11 lines
366 B
JavaScript

chrome.runtime.onInstalled.addListener(() => {
chrome.storage.local.get("replacements", (data) => {
if (!data.replacements) {
fetch(chrome.runtime.getURL("replacements.json"))
.then((response) => response.json())
.then((json) => {
chrome.storage.local.set({ replacements: json });
});
}
});
});