-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade to manifest 3, prep for translation, and add json download
- Loading branch information
Ericka Menchen Trevino
committed
Aug 6, 2022
1 parent
45291fd
commit 6a6a354
Showing
14 changed files
with
935 additions
and
94 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
importScripts("service-worker.js"); | ||
|
||
|
||
//TODO: | ||
/** | ||
* | ||
*/ | ||
|
||
// service worker invocation stuff | ||
service_worker_invoke(); | ||
// setTimeout(sync_profile, 5000); | ||
|
||
// configure listeners for browser startup and extension install | ||
chrome.runtime.onStartup.addListener(service_worker_invoke); | ||
chrome.runtime.onInstalled.addListener(async () => { | ||
|
||
const tab = await chrome.tabs.create({ | ||
url: 'index.html' | ||
}); | ||
|
||
await service_worker_invoke(); | ||
}); | ||
|
||
// run on startup | ||
async function service_worker_invoke() { | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
function localizeHtmlPage() { | ||
//Localize by replacing __MSG_***__ meta tags | ||
var objects = document.querySelectorAll('[data-i18n]'); | ||
for (var j = 0; j < objects.length; j++) { | ||
var obj = objects[j]; | ||
|
||
var valStrH = obj.innerHTML.toString(); | ||
var msg = obj.getAttribute('data-i18n').replace(/(__MSG_)/, '').replace(/(__)/, ''); | ||
var valNewH = chrome.i18n.getMessage(msg) || valStrH; | ||
|
||
if (valNewH != valStrH) { | ||
obj.innerHTML = valNewH; | ||
} | ||
} | ||
} | ||
|
||
localizeHtmlPage(); |
Oops, something went wrong.