Skip to content

Commit

Permalink
Remove proxy + fix disclaimer styles
Browse files Browse the repository at this point in the history
  • Loading branch information
acquitelol committed Nov 26, 2023
1 parent 86ed314 commit 6c18033
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion extension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Azalea",
"version": "3.5.1",
"version": "3.5.2",
"description": "The cutest SparxMaths extension for Chromium ~!",
"manifest_version": 3,
"author": "Rosie",
Expand Down
4 changes: 2 additions & 2 deletions src/core/patches/menu/settings/Updater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ export default () => {
return <>
<div style={merge(x => [x.container, { background: 'var(--palette-light-blue-20)' }])}>
<components.SectionBody style={commonStyles.merge(x => [x.textCenter, styles.message])}>
<h2>
<h2 style={{ marginBlock: '0.25em' }}>
Disclaimer
</h2>
<components.Dividers.Small />
<p style={{ marginInline: '1em' }}>
<p style={{ marginInline: '1em', marginBlock: '0.5em' }}>
Do not mess with these options unless <strong>you know what you're doing.</strong> Changing these at random could <strong>break your Azalea installation.</strong> If you need help fixing it, <a href={repository.plain + '/issues/new'}>raise an issue</a>.
</p>
</components.SectionBody>
Expand Down
8 changes: 2 additions & 6 deletions src/loader/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ function promisifiedGet<T extends string[]>(...args: T): Promise<{ [K in T[numbe
return new Promise((res) => chrome.storage.local.get(...args, res))
};

function getProxiedPath(url: string) {
return `https://corsproxy.io/?${encodeURIComponent(url)}`
}

async function fetchAzalea() {
console.info('Fetching Azalea\'s bundle...');

return await fetch(getProxiedPath(bundleUrl))
return await fetch(bundleUrl)
.then(r => r.text())
.catch((error) => {
console.error(error);
Expand All @@ -25,7 +21,7 @@ async function fetchAzalea() {
async function updateAzalea(tabId) {
console.info('Checking for updates...');

const ref = await fetch(getProxiedPath(hashUrl)).then(r => r.json());
const ref = await fetch(hashUrl).then(r => r.json());

if (ref.object.sha !== (await promisifiedGet('azaleaHash')).azaleaHash) {
console.info('Update found! Attempting to override bundle...');
Expand Down

0 comments on commit 6c18033

Please sign in to comment.