Lint, add IDBManager, and add a proper way to restart the service worker when an extension is installed.

This commit is contained in:
wearrrrr 2024-07-08 19:14:01 -05:00
parent 5371feea2d
commit 6953527d2a
36 changed files with 2408 additions and 2524 deletions

View file

@ -1,2 +1,3 @@
dist
node_modules
public

View file

@ -16,8 +16,7 @@
<body>
<h1>Welcome to nginx!</h1>
<p>
If you see this page, the nginx web server is successfully installed and working. Further
configuration is required. If you are expecting another page, please check your network or
If you see this page, the nginx web server is successfully installed and working. Further configuration is required. If you are expecting another page, please check your network or
<a href="/" id="rcheck"><b>Refresh this page</b></a>
</p>

View file

@ -1,7 +1,6 @@
import { defineConfig } from "astro/config";
import node from "@astrojs/node";
import sitemap from "@astrojs/sitemap";
import partytown from '@astrojs/partytown';
export default defineConfig({
site: "https://aluu.xyz",
@ -16,9 +15,6 @@ export default defineConfig({
defaultLocale: "en",
},
}),
partytown({
forward: ['dataLayer.push'],
}),
],
output: "hybrid",
adapter: node({

View file

@ -116,9 +116,7 @@ app.get("/search", async (req, res) => {
try {
const { query } = req.query;
const response = await fetch(`http://api.duckduckgo.com/ac?q=${query}&format=json`).then(
(apiRes) => apiRes.json()
);
const response = await fetch(`http://api.duckduckgo.com/ac?q=${query}&format=json`).then((apiRes) => apiRes.json());
res.send(response);
} catch (err) {

View file

@ -31,9 +31,7 @@ export async function masqrCheck(config) {
const auth = Buffer.from(authheader.split(" ")[1], "base64").toString().split(":");
const pass = auth[1];
const licenseCheck = (
await (await fetch(config.licenseServer + pass + "&host=" + req.headers.host)).json()
)["status"];
const licenseCheck = (await (await fetch(config.licenseServer + pass + "&host=" + req.headers.host)).json())["status"];
if (licenseCheck == "License valid") {
res.cookie("authcheck", "true", {
expires: new Date(Date.now() + 365 * 24 * 60 * 60 * 1000),

3773
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,7 @@ const config = {
bracketSameLine: true,
arrowParens: "always",
plugins: ["prettier-plugin-astro"],
printWidth: 100,
printWidth: 200,
};
export default config;

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,9 @@
[data-theme="oled"] {
--background-color: #000;
--background-highlight: #111;
--accent-color: rgb(30 0 79);
--accent-color-brighter: rgb(60 0 155);
--text-color: #fff;
--text-color-accent: #dddddd;
--dropdown-background-color: #1a1a1a;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

View file

@ -20,12 +20,13 @@ function loadExtensionScripts() {
request.onsuccess = () => {
let extensions = request.result;
extensions.forEach((extension) => {
eval(atob(extension.script));
if (extension.type != "serviceWorker") return;
eval(atob(extension.scriptCopy));
ww.use({
function: self[extension.entryNamespace][extension.entryFunc],
name: extension.title,
events: ["fetch"],
}); // Use extension middleware
});
});
};
};

View file

@ -13,7 +13,7 @@ const timeEnd = console.timeEnd.bind(console, "[WorkerWare]");
const defaultOpt = {
debug: false,
randomNames: false,
timing: false
timing: false,
};
const validEvents = [
@ -49,7 +49,7 @@ class WorkerWare {
version: "0.1.0",
middlewares: this._middlewares,
options: this._opt,
}
};
}
use(middleware) {
let validateMW = this.validateMiddleware(middleware);
@ -68,13 +68,13 @@ class WorkerWare {
let fn = async () => {
for (let i = 0; i < middlewares.length; i++) {
if (middlewares[i].events.includes(event.type)) {
if (this._opt.timing) console.time(middlewares[i].name)
if (this._opt.timing) console.time(middlewares[i].name);
// Add the configuration to the event object.
event.workerware = {
config: middlewares[i].configuration || {},
};
let res = await middlewares[i].function(event);
if (this._opt.timing) console.timeEnd(middlewares[i].name)
if (this._opt.timing) console.timeEnd(middlewares[i].name);
returnList.push(res);
}
}
@ -104,12 +104,12 @@ class WorkerWare {
return middlewares[id](event);
}
}
// type middlewareManifest = {
// function: Function,
// name?: string,
// events: string[], // Should be a union of validEvents.
// configuration?: Object // Optional configuration for the middleware.
// }
// type middlewareManifest = {
// function: Function,
// name?: string,
// events: string[], // Should be a union of validEvents.
// configuration?: Object // Optional configuration for the middleware.
// }
validateMiddleware(middleware) {
if (!middleware.function)
return {

View file

@ -62,10 +62,7 @@
else if (!(url.startsWith("https://") || url.startsWith("http://"))) url = "http://" + url;
if (openWith) {
let openWithParsed = JSON.parse(openWith);
if (
openWithParsed.value === "newTab" ||
(currentProxy && JSON.parse(currentProxy).value === "rammerhead")
) {
if (openWithParsed.value === "newTab" || (currentProxy && JSON.parse(currentProxy).value === "rammerhead")) {
window.open(await getProxyURL(), "_blank");
return;
}
@ -118,15 +115,7 @@
iframe.classList.add("proxy-frame");
document.body.appendChild(iframe);
setTimeout(() => {
iframeLoad(
iframe,
loadingContent,
topbar,
closeButton,
shareButton,
forwardsButton,
backwardsButton
);
iframeLoad();
}, 500);
function setActive() {
@ -157,15 +146,7 @@
// }
// }
function iframeLoad(
iframe: HTMLIFrameElement,
loadingContent: HTMLElement,
topbar: HTMLDivElement,
closeButton: HTMLButtonElement,
shareButton: HTMLImageElement,
forwardsButton: HTMLImageElement,
backwardsButton: HTMLImageElement
) {
function iframeLoad() {
loadingContent.style.opacity = "0";
iframe.style.opacity = "1";
topbar.style.opacity = "1";
@ -199,13 +180,7 @@
let currentProxy = localStorage.getItem("alu__selectedProxy");
let proxyFrame = document.getElementById("proxy-frame") as HTMLIFrameElement;
if (currentProxy && JSON.parse(currentProxy).value === "rammerhead") {
navigator.clipboard.writeText(
window.location.origin +
"/" +
getCookie("rammerhead-session") +
"/" +
input!.value.trim()
);
navigator.clipboard.writeText(window.location.origin + "/" + getCookie("rammerhead-session") + "/" + input!.value.trim());
} else {
navigator.clipboard.writeText(getUVProxyURL(proxyFrame));
}
@ -300,9 +275,7 @@
let proxiedFavicon = document.getElementById("proxied-favicon") as HTMLImageElement;
if (iframe) {
if (iframe.contentDocument) {
let favicon =
(iframe.contentDocument.querySelector("link[rel='icon']") as HTMLLinkElement) ||
(iframe.contentDocument.querySelector("link[rel*='icon']") as HTMLLinkElement);
let favicon = (iframe.contentDocument.querySelector("link[rel='icon']") as HTMLLinkElement) || (iframe.contentDocument.querySelector("link[rel*='icon']") as HTMLLinkElement);
if (favicon && favicon.href.includes("data:image")) {
proxiedFavicon.src = favicon.href;
return;

View file

@ -45,10 +45,7 @@ const presetCloaks = [
{
presetCloaks.map((cloak: any) => {
return (
<div
class="cloak-item"
data-cloak-name={cloak.cloakTitle}
data-cloak-icon={cloak.favicon}>
<div class="cloak-item" data-cloak-name={cloak.cloakTitle} data-cloak-icon={cloak.favicon}>
<img class="cloak-image" src={cloak.favicon} alt={cloak.cloakTitle} />
</div>
);

View file

@ -6,32 +6,16 @@ const t = i18n.inferLangUseTranslations(Astro.url);
<div class="settings-container">
<div class="credits-container">
<p class="credit-item">
{t("ultraviolet")} - <a
target="_blank"
rel="noreferrer noopener"
href="https://titaniumnetwork.org/">Titanium Network</a
>
{t("ultraviolet")} - <a target="_blank" rel="noreferrer noopener" href="https://titaniumnetwork.org/">Titanium Network</a>
</p>
<p class="credit-item">
{t("settings.credits.japaneseTranslations")} - <a
target="_blank"
rel="noreferrer noopener"
href="https://wearr.dev">wearr</a
>
{t("settings.credits.japaneseTranslations")} - <a target="_blank" rel="noreferrer noopener" href="https://wearr.dev">wearr</a>
</p>
<p class="credit-item">
{t("settings.credits.mochaandmacchiatothemes")} - <a
target="_blank"
rel="noreferrer noopener"
href="https://github.com/catppuccin/catppuccin">Catppuccin</a
>
{t("settings.credits.mochaandmacchiatothemes")} - <a target="_blank" rel="noreferrer noopener" href="https://github.com/catppuccin/catppuccin">Catppuccin</a>
</p>
<p class="credit-item">
Rosé Pine Theme - <a
target="_blank"
rel="noreferrer noopener"
href="https://rosepinetheme.com/">Rosé Pine</a
>
Rosé Pine Theme - <a target="_blank" rel="noreferrer noopener" href="https://rosepinetheme.com/">Rosé Pine</a>
</p>
</div>
</div>

View file

@ -23,12 +23,7 @@ const languageList = [
<Dropdown buttonNameDefault="Alu" dropdownList={themeList} id="dropdown__selected-theme" />
</div>
<div class="setting__language">
<label aria-label="Language" class="setting-label">{t("settings.customization.language")}</label
>
<Dropdown
buttonNameDefault="English"
dropdownList={languageList}
id="dropdown__selected-language"
/>
<label aria-label="Language" class="setting-label">{t("settings.customization.language")}</label>
<Dropdown buttonNameDefault="English" dropdownList={languageList} id="dropdown__selected-language" />
</div>
</div>

View file

@ -33,63 +33,31 @@ const transportsList = [
<div class="settings-container">
<div class="setting__selected-proxy">
<label aria-label="Selected Proxy" class="setting-label"
>{t("settings.proxy.selectedProxy")}</label
>
<Dropdown
buttonNameDefault="Ultraviolet"
dropdownList={proxyList}
localStorageKey="alu__selectedProxy"
id="dropdown__selected-proxy"
/>
<label aria-label="Selected Proxy" class="setting-label">{t("settings.proxy.selectedProxy")}</label>
<Dropdown buttonNameDefault="Ultraviolet" dropdownList={proxyList} localStorageKey="alu__selectedProxy" id="dropdown__selected-proxy" />
</div>
<div class="setting__search-engine">
<label aria-label="Search Engine" class="setting-label"
>{t("settings.proxy.searchEngine")}</label
>
<Dropdown
buttonNameDefault="Google"
dropdownList={searchEngineList}
localStorageKey="alu__searchEngine"
id="dropdown__search-engine"
/>
<label aria-label="Search Engine" class="setting-label">{t("settings.proxy.searchEngine")}</label>
<Dropdown buttonNameDefault="Google" dropdownList={searchEngineList} localStorageKey="alu__searchEngine" id="dropdown__search-engine" />
</div>
<div class="setting__open_with">
<label aria-label="Open Page With" class="setting-label"
>{t("settings.proxy.openPageWith")}</label
>
<Dropdown
buttonNameDefault={t("settings.proxy.openPageWith.embed")}
dropdownList={openPageWith}
localStorageKey="alu__selectedOpenWith"
id="dropdown__open-with"
/>
<label aria-label="Open Page With" class="setting-label">{t("settings.proxy.openPageWith")}</label>
<Dropdown buttonNameDefault={t("settings.proxy.openPageWith.embed")} dropdownList={openPageWith} localStorageKey="alu__selectedOpenWith" id="dropdown__open-with" />
</div>
<div class="setting__wisp_url">
<label aria-label="Wisp URL" for="wisp-url-input" class="setting-label"
>{t("settings.proxy.wispURL")}</label
>
<label aria-label="Wisp URL" for="wisp-url-input" class="setting-label">{t("settings.proxy.wispURL")}</label>
<Input height="50px" inputName="wisp-url" />
</div>
<div class="setting__bare_url">
<label aria-label="Bare Server URL" for="bare-url-input" class="setting-label"
>{t("settings.proxy.bareURL")}</label
>
<label aria-label="Bare Server URL" for="bare-url-input" class="setting-label">{t("settings.proxy.bareURL")}</label>
<Input height="50px" inputName="bare-url" />
</div>
<div class="setting__transport">
<label aria-label="Wisp Transport" class="setting-label">{t("settings.proxy.transport")}</label>
<Dropdown
buttonNameDefault="Epoxy"
dropdownList={transportsList}
localStorageKey="alu__selectedTransport"
id="dropdown__transport"
/>
<Dropdown buttonNameDefault="Epoxy" dropdownList={transportsList} localStorageKey="alu__selectedTransport" id="dropdown__transport" />
</div>
</div>
<div class="setting__searxng-url">
<label aria-label="SearXNG URL" for="searxng-url-input" class="setting-label"
>{t("settings.proxy.searxngURL")}</label
>
<label aria-label="SearXNG URL" for="searxng-url-input" class="setting-label">{t("settings.proxy.searxngURL")}</label>
<Input height="50px" inputName="searxng-url" defaultTextContent="https://searxng.site/" />
</div>

View file

@ -3,10 +3,7 @@
let currentTheme = localStorage.getItem("alu__selectedTheme");
if (currentTheme) {
document.documentElement.setAttribute(
"data-theme",
JSON.parse(currentTheme).value.toLowerCase()
);
document.documentElement.setAttribute("data-theme", JSON.parse(currentTheme).value.toLowerCase());
let footer = document.getElementById("footer");
if (footer) {
footer.dataset.theme = JSON.parse(currentTheme).value.toLowerCase();

View file

@ -3,12 +3,7 @@ const { buttonNameDefault, dropdownList, id, localStorageKey } = Astro.props;
---
<div class="dropdown">
<button
data-local-storage-key={localStorageKey}
id={id}
class="dropdown-toggle"
type="button"
data-toggle="dropdown">
<button data-local-storage-key={localStorageKey} id={id} class="dropdown-toggle" type="button" data-toggle="dropdown">
{buttonNameDefault}
<span class="caret"></span></button
>

View file

@ -10,6 +10,7 @@ const t = i18n.useTranslations(lang);
<a href={`/${lang}/`} class="header-item">{t("nav.brand")}</a>
</div>
<div class="right">
<a href={`/${lang}/marketplace/`} class="header-item">Marketplace</a>
<a href={`/${lang}/games/`} class="header-item">{t("nav.games")}</a>
<a href={`/${lang}/settings/`} class="header-item">{t("nav.settings")}</a>
</div>

View file

@ -1,13 +1,5 @@
---
const {
inputName,
defaultTextContent,
height,
placeholder,
className,
defaultStyles = true,
autocomplete = "on",
} = Astro.props;
const { inputName, defaultTextContent, height, placeholder, className, defaultStyles = true, autocomplete = "on" } = Astro.props;
const styleList = className ? className.split(" ") : [];

View file

@ -1,11 +1,4 @@
<svg
width="100%"
height="100%"
preserveAspectRatio="none"
id="svg"
viewBox="0 0 1440 390"
xmlns="http://www.w3.org/2000/svg"
class="transition duration-300 ease-in-out delay-150">
<svg width="100%" height="100%" preserveAspectRatio="none" id="svg" viewBox="0 0 1440 390" xmlns="http://www.w3.org/2000/svg" class="transition duration-300 ease-in-out delay-150">
<style>
.path-0 {
animation: pathAnim-0 15s;

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

@ -1,35 +1,14 @@
<script>
let primaryColor = "#8c25fa";
let secondaryColor = "#601aab";
console.log(
"%cWelcome to Alu",
`color: ${primaryColor}; font-size: 2rem; font-weight: bold; text-shadow: 2px 2px 0 ${secondaryColor};`
);
console.log("%cWelcome to Alu", `color: ${primaryColor}; font-size: 2rem; font-weight: bold; text-shadow: 2px 2px 0 ${secondaryColor};`);
console.log(
"%cSystem Information: ",
`color: ${primaryColor}; font-size: 1rem; font-weight: bold;`
);
console.log(
"%cOS: " + navigator.platform,
`color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`
);
console.log(
"%cBrowser: " + navigator.userAgent,
`color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`
);
console.log(
"%cCPU Cores: " + navigator.hardwareConcurrency,
`color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`
);
console.log("%cSystem Information: ", `color: ${primaryColor}; font-size: 1rem; font-weight: bold;`);
console.log("%cOS: " + navigator.platform, `color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`);
console.log("%cBrowser: " + navigator.userAgent, `color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`);
console.log("%cCPU Cores: " + navigator.hardwareConcurrency, `color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`);
// Cmon firefox, do we really not support this?? Basic stuff here from the "indie browser".
console.log(
"%cMemory: " + (navigator as any).deviceMemory + "GB",
`color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`
);
console.log("%cMemory: " + (navigator as any).deviceMemory + "GB", `color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`);
console.log(
"%cPlease include this information in a bug report!",
`color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`
);
console.log("%cPlease include this information in a bug report!", `color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`);
</script>

View file

@ -0,0 +1,29 @@
export let CurrentIDB: IDBDatabase;
export function loadIDB(name: string, version: number) {
const request = window.indexedDB.open(name, version);
return request;
}
export function GetIDB() {
return CurrentIDB;
}
export function SetIDB(idb: IDBDatabase) {
CurrentIDB = idb;
}
export function GetStore(name: string, mode: IDBTransactionMode) {
if (CurrentIDB == null) {
throw new Error("IDB not loaded!");
}
return CurrentIDB.transaction(name, mode).objectStore(name);
}
export default {
loadIDB,
SetIDB,
GetIDB,
GetStore,
};

View file

@ -21,8 +21,7 @@ type transportConfig =
}
| string;
export const wispURLDefault =
(location.protocol === "https:" ? "wss://" : "ws://") + location.host + "/wisp/";
export const wispURLDefault = (location.protocol === "https:" ? "wss://" : "ws://") + location.host + "/wisp/";
export default class TransportManager {
private transport = "EpxMod.EpoxyClient";
@ -66,28 +65,25 @@ export default class TransportManager {
export const TransportMgr = new TransportManager();
export async function registerSW() {
navigator.serviceWorker.ready.then(async (sw) => {
await registerRemoteListener(sw.active!);
});
export async function registerAndUpdateSW() {
return new Promise(async (resolve) => {
await navigator.serviceWorker.register("/sw.js").then((registration) => {
// Update SW
registration.update().then(() => {
console.log("SW updated");
resolve(null);
});
navigator.serviceWorker
.register("/sw.js", {
updateViaCache: "none",
})
.then(async (reg) => {
console.log("Service worker registered!");
await registerRemoteListener(reg.active!);
reg.update();
resolve(null);
});
});
}
export async function initTransport() {
await registerRemoteListener(navigator.serviceWorker.controller!);
TransportMgr.setTransport(
TransportMgr.getTransport(),
localStorage.getItem("alu__wispUrl") || wispURLDefault
);
TransportMgr.setTransport(TransportMgr.getTransport(), localStorage.getItem("alu__wispUrl") || wispURLDefault);
}
export async function loadSelectedTransportScript(): Promise<void> {

View file

@ -0,0 +1,249 @@
import "notyf/notyf.min.css";
import { Notyf } from "notyf";
import marketplaceManifest from "../../json/marketplace.json";
const installButtons = document.getElementsByClassName("btn-install");
import IDBManager from "./IDBManager";
type VALID_EXT_TYPES = "serviceWorker" | "theme" | "page";
// This just makes it shorter to type
interface HTMLButton extends HTMLButtonElement {}
interface ExtensionMetadata {
title: string;
// TODO: Add description to the manifest
// description: string;
// Versions should follow semantic versioning
version: string;
script: string;
entryNamespace?: string;
entryFunc?: string;
scriptCopy: string | null;
type: VALID_EXT_TYPES;
themeName?: string;
}
enum EXT_RETURN {
INSTALL_SUCCESS = 0,
INSTALL_FAILED = -1,
ALREADY_INSTALLED = 1,
}
type InstallReturn = {
code: EXT_RETURN;
slug: string;
title?: string;
};
Array.from(installButtons).forEach((btn) => {
btn.addEventListener("click", async (event) => {
const ele = event.target as HTMLButton;
const title = ele.dataset.title;
let notification = new Notyf({
duration: 999999,
position: { x: "right", y: "bottom" },
dismissible: true,
ripple: true,
});
let installNotif = notification.success(`Installing ${title}...`);
if (ele.dataset.slug) {
let obj = await getMarketplaceObj(ele.dataset.slug);
installExtension(obj, ele.dataset.slug)
.then((ret) => {
let notifMessage: string;
let timeout = 2000;
switch (ret.code) {
case EXT_RETURN.INSTALL_SUCCESS:
notifMessage = `Installed ${title} Successfully!`;
// Unregister the service worker if it's a service worker
if (obj.type === "serviceWorker") {
navigator.serviceWorker.getRegistration().then((reg) => {
if (reg) {
reg.unregister().then(() => {
console.log("Service worker unregistered!");
});
}
});
};
break;
case EXT_RETURN.ALREADY_INSTALLED:
notifMessage = `${title} is already installed!`;
timeout = 0;
break;
case EXT_RETURN.INSTALL_FAILED:
// We should NEVER get here, but just in case.
notifMessage = `Failed to install ${title}!`;
break;
}
setTimeout(() => {
notification.dismiss(installNotif);
notification.options.duration = 2000;
notification.success(notifMessage);
setTimeout(() => {
notification.success(`Please refresh the page to see the changes!`);
}, 200)
notification.options.duration = 999999;
let btn = document.querySelector(`button[data-slug="${ret.slug}"]`) as HTMLButton;
setInstallBtnText(btn);
}, timeout);
})
.catch(() => {
notification.dismiss(installNotif);
notification.options.duration = 2000;
notification.error(`Failed to install ${title}!`);
notification.options.duration = 999999;
});
}
});
});
async function getMarketplaceObj(slug: string): Promise<ExtensionMetadata> {
const manifest = (marketplaceManifest as unknown as { [key: string]: ExtensionMetadata })[slug];
manifest.scriptCopy = btoa(await fetch(manifest.script).then((res) => res.text()));
return manifest;
}
async function installExtension(ext: ExtensionMetadata, slug: string): Promise<InstallReturn> {
return new Promise<InstallReturn>((resolve, reject) => {
const request = IDBManager.GetIDB();
const transaction = request.transaction("InstalledExtensions", "readwrite");
const store = transaction.objectStore("InstalledExtensions");
const extensionObject = {
slug: slug,
...ext,
};
let slugCheck = store.get(slug);
slugCheck.onsuccess = async () => {
if (slugCheck.result != null) {
resolve({ code: EXT_RETURN.ALREADY_INSTALLED, slug: slug });
} else {
const addRequest = store.add(extensionObject);
addRequest.onerror = () => {
console.error(`Error installing ${slug}!`);
reject({ code: EXT_RETURN.INSTALL_FAILED, slug: slug });
};
addRequest.onsuccess = () => {
resolve({ code: EXT_RETURN.INSTALL_SUCCESS, slug: slug });
};
}
};
});
}
document.querySelectorAll("button[data-uninstall-slug]").forEach((btn) => {
btn.addEventListener("click", async (event) => {
if (!confirm("Are you sure you want to uninstall this extension?")) {
return;
}
let uninst = await uninstallExtension((event.target as HTMLButton).dataset.uninstallSlug!)
let notification = new Notyf({
duration: 999999,
position: { x: "right", y: "bottom" },
dismissible: true,
ripple: true,
});
switch (uninst.code) {
case EXT_RETURN.INSTALL_SUCCESS:
notification.success(`Uninstalled ${uninst.title}!`);
let btn = document.querySelector(`button[data-slug="${uninst.slug}"]`) as HTMLButton;
btn.disabled = false;
btn.textContent = "Install";
btn.classList.remove("installed");
(event.target as HTMLButton).classList.add("btn-hidden");
break;
case EXT_RETURN.INSTALL_FAILED:
notification.error(`Failed to uninstall ${uninst.title}!`);
break;
}
setTimeout(() => {
window.location.reload();
}, 2000);
})
})
async function uninstallExtension(slug: string): Promise<InstallReturn> {
return new Promise<InstallReturn>((resolve, reject) => {
if (!slug || slug == null) {
reject({ code: EXT_RETURN.INSTALL_FAILED, slug: slug });
}
const request = IDBManager.GetIDB();
const transaction = request.transaction("InstalledExtensions", "readwrite");
const store = transaction.objectStore("InstalledExtensions");
const deleteRequest = store.delete(slug);
deleteRequest.onerror = () => {
console.error(`Error uninstalling ${slug}!`);
reject({ code: EXT_RETURN.INSTALL_FAILED, slug: slug, title: slug });
};
deleteRequest.onsuccess = () => {
navigator.serviceWorker.getRegistration().then((reg) => {
if (reg) {
reg.unregister().then(() => {
console.log("Service worker unregistered!");
});
}
});
resolve({ code: EXT_RETURN.INSTALL_SUCCESS, slug: slug, title: slug });
};
});
};
function setInstallBtnText(btn: HTMLButton) {
btn.disabled = true;
btn.textContent = "Installed";
btn.classList.add("installed");
}
function getInstallStatus() {
let installBtns = document.querySelectorAll("button[data-slug]") as NodeListOf<HTMLButton>;
let transaction = IDBManager.GetStore("InstalledExtensions", "readonly").transaction;
let store = transaction.objectStore("InstalledExtensions");
let cursor = store.openCursor();
cursor.onsuccess = () => {
let res = cursor.result;
if (res) {
let slug = res.value.slug;
installBtns.forEach((btn) => {
if (btn.dataset.slug == slug) {
setInstallBtnText(btn);
document.querySelector(`button[data-uninstall-slug="${slug}"]`)!.classList.remove("btn-hidden");
}
});
res.continue();
}
};
}
async function InitIDB() {
if (!window.indexedDB) {
console.error("This browser doesn't support IndexedDB");
document.getElementById("support-warning")!.innerText = "Your browser doesn't support IndexedDB. Please use a different browser!";
return;
}
if (IDBManager.GetIDB() != null) {
getInstallStatus();
return;
}
const request = IDBManager.loadIDB("AluDB", 1);
request.onerror = (event: Event) => {
console.error("Database error: " + (event.target as any).errorCode);
};
request.onsuccess = () => {
console.log("Database opened successfully");
IDBManager.SetIDB(request.result);
getInstallStatus();
};
request.onupgradeneeded = (event) => {
const db = (event.target as IDBOpenDBRequest).result;
if (!db.objectStoreNames.contains("InstalledExtensions")) {
db.createObjectStore("InstalledExtensions", { keyPath: "slug" });
console.log("Database setup complete");
}
};
}
InitIDB();
document.addEventListener("astro:after-swap", () => {
InitIDB();
});

22
src/env.d.ts vendored
View file

@ -55,14 +55,9 @@ declare module "astro-i18n" {
/** Typed astro-i18n config definition. */
export function defineAstroI18nConfig(config: Partial<AstroI18nConfig>): Partial<AstroI18nConfig>;
/** The `astro-i18n` middleware. */
export function useAstroI18n(
config?: Partial<AstroI18nConfig> | string,
formatters?: TranslationFormatters
): (...args: any[]) => any;
export function useAstroI18n(config?: Partial<AstroI18nConfig> | string, formatters?: TranslationFormatters): (...args: any[]) => any;
/** Workaround function to make astroI18n work inside getStaticPaths. This is because Astro's getStaticPaths runs before everything which doesn't allows astroI18n to update its state automatically. */
function createGetStaticPaths(
callback: (props: GetStaticPathsProps) => GetStaticPathsItem[] | Promise<GetStaticPathsItem[]>
): (
function createGetStaticPaths(callback: (props: GetStaticPathsProps) => GetStaticPathsItem[] | Promise<GetStaticPathsItem[]>): (
props: GetStaticPathsProps & {
astroI18n?: {
locale: string;
@ -78,9 +73,7 @@ declare module "astro-i18n" {
key: T | (string & {}),
...args: undefined extends TranslationVariables[T]
? [
properties?: keyof TranslationVariables extends T
? Record<string, unknown>
: TranslationVariables[T],
properties?: keyof TranslationVariables extends T ? Record<string, unknown> : TranslationVariables[T],
options?: {
route?: Route | (string & {});
locale?: Locale | (string & {});
@ -163,9 +156,7 @@ declare module "astro-i18n" {
key: T | (string & {}),
...args: undefined extends TranslationVariables[T]
? [
properties?: keyof TranslationVariables extends T
? Record<string, unknown>
: TranslationVariables[T],
properties?: keyof TranslationVariables extends T ? Record<string, unknown> : TranslationVariables[T],
options?: {
route?: Route | (string & {});
locale?: Locale | (string & {});
@ -229,10 +220,7 @@ declare module "astro-i18n" {
/** Tries to parse one of the configured locales out of the given route. If no configured locale is found it will return `null`. */
extractRouteLocale(route: string): string | null;
/** Initializes astro-i18n on the server-side. */
initialize(
config?: Partial<AstroI18nConfig> | string,
formatters?: TranslationFormatters = {}
): Promise<void>;
initialize(config?: Partial<AstroI18nConfig> | string, formatters?: TranslationFormatters = {}): Promise<void>;
/** Redirects the user to the given destination. */
redirect(destination: string | URL, status = 301);
}

View file

@ -4,7 +4,16 @@
"version": "0.0.1",
"image": "/marketplace/adblock/adblock.png",
"script": "/marketplace/adblock/index.js",
"type": "serviceWorker",
"entryNamespace": "adblockExt",
"entryFunc": "filterRequest"
},
"dev.wearr.oled-theme": {
"title": "OLED Theme",
"version": "0.0.1",
"image": "/marketplace/oled-theme/theme.png",
"script": "/marketplace/oled-theme/theme.css",
"type": "style",
"themeName": "oled"
}
}

View file

@ -27,25 +27,16 @@ const { title, optionalPreloads } = Astro.props;
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<meta name="title" content="Alu" />
<meta
name="description"
content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization."
/>
<meta name="description" content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization." />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://aluu.xyz" />
<meta property="og:title" content="Alu" />
<meta
property="og:description"
content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization."
/>
<meta property="og:description" content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization." />
<meta property="og:image" content="/logo.png" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://aluu.xyz" />
<meta property="twitter:title" content="Alu" />
<meta
property="twitter:description"
content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization."
/>
<meta property="twitter:description" content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization." />
<meta property="twitter:image" content="/logo.png" />
<link rel="sitemap" href="/sitemap-index.xml" />
<link href="/varela-round.css" rel="stylesheet" as="style" />
@ -172,7 +163,7 @@ const { title, optionalPreloads } = Astro.props;
color: var(--text-color);
text-align: center;
font-weight: 400;
font-size: 40px;
font-size: 2.5rem;
}
.title-desc {
color: var(--text-color);

View file

@ -18,15 +18,7 @@ export function getStaticPaths() {
<section id="proxy-input">
<div class="form-wrapper">
<form class="url-input-form" id="url-input-form">
<Input
className="url-input"
inputName="url"
height="50px"
placeholder={t("menu.search")}
defaultStyles={false}
transition:persist
autocomplete="off"
/>
<Input className="url-input" inputName="url" height="50px" placeholder={t("menu.search")} defaultStyles={false} transition:persist autocomplete="off" />
<div id="search-suggestions"></div>
<div id="loading-content">Loading...</div>
</form>
@ -58,11 +50,7 @@ export function getStaticPaths() {
<h2>{t("faq.contributeToAlu")}</h2>
<p>
{t("faq.contributeToAlu.answer.segment1")}
<Link
href="https://www.patreon.com/wearr"
newTab
content={t("faq.contributeToAlu.answer.patreonLinkText")}
/>
<Link href="https://www.patreon.com/wearr" newTab content={t("faq.contributeToAlu.answer.patreonLinkText")} />
{t("faq.contributeToAlu.answer.segment2")}
</p>
</div>
@ -75,11 +63,11 @@ export function getStaticPaths() {
</main>
<ProxyRegistrar />
<script>
import { initTransport, registerSW } from "@components/ts/TransportManager";
import { initTransport, registerAndUpdateSW } from "@components/ts/TransportManager";
type Suggestion = {
phrase: string;
};
await registerSW();
await registerAndUpdateSW();
async function sendAPIRequest(urlInput: HTMLInputElement, searchSuggestions: HTMLDivElement) {
if (!urlInput) throw new Error("urlInput is null");
@ -160,10 +148,6 @@ export function getStaticPaths() {
height: 56px;
}
.title-text {
font-size: 38px;
}
.url-input-form {
border: none;
padding: 0;

View file

@ -9,18 +9,21 @@ export const getStaticPaths = () => {
type MarketplaceItem = {
title: string;
version: string | number;
version: string;
image: string;
script: string;
entryNamespace: string
entryFunc: string;
type: string;
entryNamespace?: string;
entryFunc?: string;
themeName?: string;
};
---
<Layout title="Marketplace | Alu">
<div id="main-content">
<h1 class="title-text">Marketplace</h1>
<p class="title-desc">Install custom userscripts and themes for Alu.</p>
<p class="title-desc">(WIP) Install custom extensions for Alu!</p>
<div id="support-warning"></div>
<div class="marketplace-ext-grid">
{
Object.keys(marketplace).map((mp_item) => {
@ -30,166 +33,25 @@ type MarketplaceItem = {
<div class="marketplace-item" data-slug={slug}>
<img class="marketplace-item-image" src={item.image} alt={`${item.title} Logo`} />
<div class="marketplace-item-title">{item.title}</div>
<button class="marketplace-install-btn" data-slug={slug} data-title={item.title}>
<button class="marketplace-btn btn-install" data-slug={slug} data-title={item.title}>
Install
</button>
<button class="marketplace-btn btn-hidden" data-uninstall-slug={slug}>
Uninstall
</button>
</div>
);
})
}
</div>
</div>
<script src="@components/ts/marketplace.ts"></script>
</Layout>
<script>
import "notyf/notyf.min.css";
import { Notyf } from "notyf";
import marketplaceManifest from "../../json/marketplace.json";
const installButtons = document.getElementsByClassName(
"marketplace-install-btn"
);
Array.from(installButtons).forEach((btn) => {
btn.addEventListener("click", async (event) => {
const ele = event.target as HTMLButtonElement;
const title = ele.dataset.title;
let notification = new Notyf({
duration: 999999,
position: { x: "right", y: "bottom" },
dismissible: true,
ripple: true,
});
let installNotif = notification.success(`Installing ${title}...`);
if (ele.dataset.slug) {
let obj = await getMarketplaceObj(ele.dataset.slug);
installExtension(obj, ele.dataset.slug)
.then((code) => {
let notifMessage = "";
let timeout = 2000;
switch (code) {
case 0:
notifMessage = `Installed ${title} Successfully!`;
break;
case 1:
notifMessage = `${title} is already installed!`;
timeout = 0;
break;
case -1:
// We should NEVER get here, but just in case.
notifMessage = `Failed to install ${title}!`;
break;
}
setTimeout(() => {
notification.dismiss(installNotif);
notification.options.duration = 2000;
notification.success(notifMessage);
notification.options.duration = 999999;
}, timeout);
})
.catch(() => {
notification.dismiss(installNotif);
notification.options.duration = 2000;
notification.error(`Failed to install ${title}!`);
notification.options.duration = 999999;
});
}
});
});
interface ExtensionMetadata {
title: string;
version: string | number;
script: string;
entryNamespace: string;
entryFunc: string;
scriptBtoa: string | null;
}
async function getMarketplaceObj(slug: string): Promise<ExtensionMetadata> {
const manifest = (marketplaceManifest as unknown as { [key: string]: ExtensionMetadata })[slug];
manifest.scriptBtoa = btoa(await fetch(manifest.script).then((res) => res.text()));
return manifest;
}
// Stupid eslint bug.
// eslint-disable-next-line no-unused-vars
enum EXT_RETURN {
// eslint-disable-next-line no-unused-vars
INSTALL_SUCCESS = 0,
// eslint-disable-next-line no-unused-vars
INSTALL_FAILED = -1,
// eslint-disable-next-line no-unused-vars
ALREADY_INSTALLED = 1,
}
async function installExtension(ext: ExtensionMetadata, slug: string) {
return new Promise<EXT_RETURN>((resolve, reject) => {
const request = window.indexedDB.open("AluDB", 1);
request.onupgradeneeded = (event) => {
const db = (event.target as IDBOpenDBRequest).result;
if (!db.objectStoreNames.contains("InstalledExtensions")) {
db.createObjectStore("InstalledExtensions", { keyPath: "slug" });
}
};
request.onsuccess = async (event) => {
const db = (event.target as IDBOpenDBRequest).result;
const transaction = db.transaction("InstalledExtensions", "readwrite");
const store = transaction.objectStore("InstalledExtensions");
const extensionObject = {
slug: slug,
title: ext.title,
version: ext.version,
script: ext.scriptBtoa,
entryNamespace: ext.entryNamespace,
entryFunc: ext.entryFunc,
};
// Check if the key already exists in the IDB
let slugCheck = store.get(slug);
slugCheck.onsuccess = async () => {
if (slugCheck.result != undefined) {
resolve(EXT_RETURN.ALREADY_INSTALLED);
} else {
const addRequest = store.add(extensionObject);
addRequest.onerror = () => {
console.error(`Error installing ${slug}!`);
reject(EXT_RETURN.INSTALL_FAILED);
};
addRequest.onsuccess = () => {
resolve(EXT_RETURN.INSTALL_SUCCESS);
};
}
};
slugCheck.onerror = () => {
console.error("Error checking install status!");
reject(EXT_RETURN.INSTALL_FAILED);
};
};
});
}
function InitIDB() {
if (!window.indexedDB) {
console.error("This browser doesn't support IndexedDB");
return;
}
const request = window.indexedDB.open("AluDB", 1);
request.onerror = (event: Event) => {
console.error("Database error: " + (event.target as any).errorCode);
};
request.onsuccess = () => {
console.log("Database opened successfully");
};
request.onupgradeneeded = (event) => {
const db = (event.target as IDBOpenDBRequest).result;
if (!db.objectStoreNames.contains("InstalledExtensions")) {
db.createObjectStore("InstalledExtensions", { keyPath: "slug" });
console.log("Database setup complete");
}
};
}
InitIDB();
</script>
<style>
.title-desc {
font-size: 1.2rem;
}
.marketplace-ext-grid {
display: grid;
width: 90%;
@ -213,7 +75,7 @@ type MarketplaceItem = {
width: 64px;
height: 64px;
}
.marketplace-install-btn {
.marketplace-btn {
width: 100%;
background-color: var(--accent-color);
color: var(--text-color);
@ -222,5 +84,23 @@ type MarketplaceItem = {
padding: 3px;
cursor: pointer;
font-family: "Varela Round", sans-serif;
border-radius: 15px;
margin-top: 10px;
transition: 250ms ease-in-out;
}
.marketplace-btn.installed {
filter: brightness(0.8);
cursor: auto;
}
#support-warning {
padding-top: 10px;
padding-bottom: 50px;
height: 20px;
color: #ff6923;
text-align: center;
}
.btn-hidden {
opacity: 0;
pointer-events: none;
}
</style>

View file

@ -202,18 +202,8 @@ export function getStaticPaths() {
applySavedLocalStorage("alu__selectedLanguage", "dropdown__selected-language");
let themeDropdown = document.getElementById("dropdown__selected-theme-menu");
let languageDropdown = document.getElementById("dropdown__selected-language-menu");
applyDropdownEventListeners(
themeDropdown,
"dropdown__selected-theme",
"alu__selectedTheme",
changeTheme
);
applyDropdownEventListeners(
languageDropdown,
"dropdown__selected-language",
"alu__selectedLanguage",
navigateToNewLangaugePage
);
applyDropdownEventListeners(themeDropdown, "dropdown__selected-theme", "alu__selectedTheme", changeTheme);
applyDropdownEventListeners(languageDropdown, "dropdown__selected-language", "alu__selectedLanguage", navigateToNewLangaugePage);
}
function setupCloakingSettings() {
@ -313,18 +303,15 @@ export function getStaticPaths() {
let bareURLInput = document.getElementById("bare-url-input");
let savedSearxngUrl = localStorage.getItem("alu__searxngUrl");
if (savedSearxngUrl != null) {
if (savedSearxngUrl == "")
localStorage.setItem("alu__searxngUrl", "https://searxng.site/");
if (savedSearxngUrl == "") localStorage.setItem("alu__searxngUrl", "https://searxng.site/");
searxngUrlInput.value = localStorage.getItem("alu__searxngUrl");
}
const useWss = location.protocol == "https:";
const webSocketProtocol = useWss ? "wss://" : "ws://";
let savedWispUrl = localStorage.getItem("alu__wispUrl");
if (savedWispUrl == null || savedWispUrl == "")
localStorage.setItem("alu__wispUrl", webSocketProtocol + location.host + "/wisp/");
if (savedWispUrl == null || savedWispUrl == "") localStorage.setItem("alu__wispUrl", webSocketProtocol + location.host + "/wisp/");
let savedBareUrl = localStorage.getItem("alu__bareUrl");
if (savedBareUrl == null || savedBareUrl == "")
localStorage.setItem("alu__bareUrl", location.origin + "/bare/");
if (savedBareUrl == null || savedBareUrl == "") localStorage.setItem("alu__bareUrl", location.origin + "/bare/");
wispURLInput.value = localStorage.getItem("alu__wispUrl");
bareURLInput.value = localStorage.getItem("alu__bareUrl");
// Proxy settings
@ -332,22 +319,11 @@ export function getStaticPaths() {
applyInputListeners(wispURLInput, "alu__wispUrl");
applyInputListeners(bareURLInput, "alu__bareUrl");
[selectedProxyDropdown, openWithDropdown, currentTransportDropdown].forEach(
(dropdown) => {
[selectedProxyDropdown, openWithDropdown, currentTransportDropdown].forEach((dropdown) => {
let dropdownButton = document.getElementById(dropdown.id.replace("-menu", ""));
applyDropdownEventListeners(
dropdown,
dropdownButton.id,
dropdownButton.dataset.localStorageKey
);
}
);
applyDropdownEventListeners(
searchEngineDropdown,
"dropdown__search-engine",
"alu__search_engine",
checkSearxng
);
applyDropdownEventListeners(dropdown, dropdownButton.id, dropdownButton.dataset.localStorageKey);
});
applyDropdownEventListeners(searchEngineDropdown, "dropdown__search-engine", "alu__search_engine", checkSearxng);
checkSearxng();
} else if (event.detail == "setting-tab-customization") {
setupCustomizationSettings();

View file

@ -8,25 +8,16 @@ import { ViewTransitions } from "astro:transitions";
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<meta name="title" content="Alu" />
<meta
name="description"
content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization."
/>
<meta name="description" content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization." />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://aluu.xyz" />
<meta property="og:title" content="Alu" />
<meta
property="og:description"
content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization."
/>
<meta property="og:description" content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization." />
<meta property="og:image" content="/logo.png" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://aluu.xyz" />
<meta property="twitter:title" content="Alu" />
<meta
property="twitter:description"
content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization."
/>
<meta property="twitter:description" content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization." />
<meta property="twitter:image" content="/logo.png" />
<ViewTransitions />
<script>

View file

@ -8,30 +8,21 @@ import Layout from "src/layouts/Layout.astro";
<h1 class="title-text">Privacy Policy</h1>
<p>
Alu Project operates the <Link href="https://aluu.xyz" newTab content="https://aluu.xyz" /> website,
which provides this Web Proxy service.
Alu Project operates the <Link href="https://aluu.xyz" newTab content="https://aluu.xyz" /> website, which provides this Web Proxy service.
</p>
<p>This page is used to inform website visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service, the Alu website.</p>
<p>
If you choose to use our Service, then you agree to the collection and use of information in relation with this policy. The Personal Information that we collect are used for providing and
improving the Service. We will not use or share your information with anyone except as described in this Privacy Policy.
</p>
<p>
This page is used to inform website visitors regarding our policies with the collection, use,
and disclosure of Personal Information if anyone decided to use our Service, the Alu website.
</p>
<p>
If you choose to use our Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that we collect are used for providing and
improving the Service. We will not use or share your information with anyone except as
described in this Privacy Policy.
</p>
<p>
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions,
which is accessible at <Link href="https://aluu.xyz" newTab content="https://aluu.xyz" />,
unless otherwise defined in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at <Link href="https://aluu.xyz" newTab content="https://aluu.xyz" />, unless
otherwise defined in this Privacy Policy.
</p>
<h2><strong>Log Data</strong></h2>
<p>
Whenever you visit our Service, we potentially collect information that your browser sends to
us which we call Log Data. This Log Data may include information such as your computer's IP
address, User Agent, pages of our Service that you visit, the time and date of your visit, and
other statistics.
Whenever you visit our Service, we potentially collect information that your browser sends to us which we call Log Data. This Log Data may include information such as your computer's IP address,
User Agent, pages of our Service that you visit, the time and date of your visit, and other statistics.
</p>
<h2><strong>Service Providers</strong></h2>
<p>We may employ third-party companies and individuals due to the following reasons:</p>
@ -42,45 +33,33 @@ import Layout from "src/layouts/Layout.astro";
<li>To assist us in analyzing how our Service is used.</li>
</ul>
<p>
We want to inform our Service users that these third parties may have access to your Personal
Information. The reason is to perform the tasks assigned to them on our behalf. However, they
are obligated not to disclose or use the information for any other purpose.
We want to inform our Service users that these third parties may have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are
obligated not to disclose or use the information for any other purpose.
</p>
<h2><strong>Security</strong></h2>
<p>
We value your trust in providing us your Personal Information, thus we are striving to use
commercially acceptable means of protecting it. But remember that no method of transmission
over the internet, or method of electronic storage is 100% secure and reliable, and we cannot
guarantee its absolute security.
We value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the
internet, or method of electronic storage is 100% secure and reliable, and we cannot guarantee its absolute security.
</p>
<h2><strong>Links to Other Sites</strong></h2>
<p>
Our Service may contain links to other sites. If you click on a third-party link, you will be
directed to that site. Note that these external sites are not operated by us. Therefore, we
strongly advise you to review the Privacy Policy of these websites. We have no control over,
and assume no responsibility for the content, privacy policies, or practices of any
third-party sites or services.
Our Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by us. Therefore, we strongly
advise you to review the Privacy Policy of these websites. We have no control over, and assume no responsibility for the content, privacy policies, or practices of any third-party sites or
services.
</p>
<h2><strong>Children's Privacy</strong></h2>
<p>
Our Services do not address anyone under the age of 13. We do not knowingly collect personal
identifiable information from children under 13. In the case we discover that a child under 13
has provided us with personal information, we immediately delete this from our servers. If you
are a parent or guardian and you are aware that your child has provided us with personal
information, please contact us so that we will be able to do necessary actions.
Our Services do not address anyone under the age of 13. We do not knowingly collect personal identifiable information from children under 13. In the case we discover that a child under 13 has
provided us with personal information, we immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information,
please contact us so that we will be able to do necessary actions.
</p>
<h2><strong>Changes to This Privacy Policy</strong></h2>
<p>
We may update our Privacy Policy from time to time. Thus, we advise you to review this page
periodically for any changes. We will notify you of any changes by posting the new Privacy
Policy on this page. These changes are effective immediately, after they are posted on this
page.
We may update our Privacy Policy from time to time. Thus, we advise you to review this page periodically for any changes. We will notify you of any changes by posting the new Privacy Policy on
this page. These changes are effective immediately, after they are posted on this page.
</p>
<h2><strong>Contact Us</strong></h2>
<p>
If you have any questions or suggestions about our Privacy Policy, do not hesitate to contact
us.
</p>
<p>If you have any questions or suggestions about our Privacy Policy, do not hesitate to contact us.</p>
</div>
</Layout>

View file

@ -8,50 +8,32 @@ import Layout from "src/layouts/Layout.astro";
<p>Welcome to Alu!</p>
<p>
These terms and conditions outline the rules and regulations for the use of Alu Project's
Website, located at https://aluu.xyz.
</p>
<p>These terms and conditions outline the rules and regulations for the use of Alu Project's Website, located at https://aluu.xyz.</p>
<p>By accessing this website we assume you accept these terms and conditions. Do not continue to use Alu if you do not agree to take all of the terms and conditions stated on this page.</p>
<p>
By accessing this website we assume you accept these terms and conditions. Do not continue to
use Alu if you do not agree to take all of the terms and conditions stated on this page.
</p>
<p>
The following terminology applies to these Terms and Conditions, Privacy Statement and
Disclaimer Notice and all Agreements: "Client", "You" and "Your" refers to you, the person log
on this website and compliant to the Company's terms and conditions. "The Company",
"Ourselves", "We", "Our" and "Us", refers to our Company. "Party", "Parties", or "Us", refers
to both the Client and ourselves. All terms refer to the offer, acceptance and consideration
of payment necessary to undertake the process of our assistance to the Client in the most
appropriate manner for the express purpose of meeting the Client's needs in respect of
provision of the Company's stated services, in accordance with and subject to, prevailing law
of us. Any use of the above terminology or other words in the singular, plural, capitalization
and/or he/she or they, are taken as interchangeable and therefore as referring to same.
The following terminology applies to these Terms and Conditions, Privacy Statement and Disclaimer Notice and all Agreements: "Client", "You" and "Your" refers to you, the person log on this
website and compliant to the Company's terms and conditions. "The Company", "Ourselves", "We", "Our" and "Us", refers to our Company. "Party", "Parties", or "Us", refers to both the Client and
ourselves. All terms refer to the offer, acceptance and consideration of payment necessary to undertake the process of our assistance to the Client in the most appropriate manner for the express
purpose of meeting the Client's needs in respect of provision of the Company's stated services, in accordance with and subject to, prevailing law of us. Any use of the above terminology or other
words in the singular, plural, capitalization and/or he/she or they, are taken as interchangeable and therefore as referring to same.
</p>
<h3><strong>Cookies</strong></h3>
<p>
We employ the use of cookies. By accessing Alu, you agreed to use cookies in agreement with
the Alu Project's Privacy Policy.
</p>
<p>We employ the use of cookies. By accessing Alu, you agreed to use cookies in agreement with the Alu Project's Privacy Policy.</p>
<p>
Most interactive websites use cookies to let us retrieve the user's details for each visit.
Cookies are used by our website to enable the functionality of certain areas to make it easier
for people visiting our website. Some of our affiliate/advertising partners may also use
cookies.
Most interactive websites use cookies to let us retrieve the user's details for each visit. Cookies are used by our website to enable the functionality of certain areas to make it easier for
people visiting our website. Some of our affiliate/advertising partners may also use cookies.
</p>
<h3><strong>License</strong></h3>
<p>
Unless otherwise stated, Alu Project and/or its licensors own the intellectual property rights
for all material on Alu. All intellectual property rights are reserved. You may access this
from Alu for your own personal use subjected to restrictions set in these terms and
conditions.
Unless otherwise stated, Alu Project and/or its licensors own the intellectual property rights for all material on Alu. All intellectual property rights are reserved. You may access this from
Alu for your own personal use subjected to restrictions set in these terms and conditions.
</p>
<p>You must not:</p>
@ -72,26 +54,16 @@ import Layout from "src/layouts/Layout.astro";
<li>Government agencies;</li>
<li>Search engines;</li>
<li>News organizations;</li>
<li>
Online directory distributors may link to our Website in the same manner as they hyperlink
to the Websites of other listed businesses; and
</li>
<li>
System wide Accredited Businesses except soliciting non-profit organizations, charity
shopping malls, and charity fundraising groups which may not hyperlink to our Web site.
</li>
<li>Online directory distributors may link to our Website in the same manner as they hyperlink to the Websites of other listed businesses; and</li>
<li>System wide Accredited Businesses except soliciting non-profit organizations, charity shopping malls, and charity fundraising groups which may not hyperlink to our Web site.</li>
</ul>
<p>
These organizations may link to our home page, to publications or to other Website information
so long as the link: (a) is not in any way deceptive; (b) does not falsely imply sponsorship,
endorsement or approval of the linking party and its products and/or services; and (c) fits
within the context of the linking party's site.
These organizations may link to our home page, to publications or to other Website information so long as the link: (a) is not in any way deceptive; (b) does not falsely imply sponsorship,
endorsement or approval of the linking party and its products and/or services; and (c) fits within the context of the linking party's site.
</p>
<p>
We may consider and approve other link requests from the following types of organizations:
</p>
<p>We may consider and approve other link requests from the following types of organizations:</p>
<ul>
<li>commonly-known consumer and/or business information sources;</li>
@ -104,26 +76,20 @@ import Layout from "src/layouts/Layout.astro";
</ul>
<p>
We will approve link requests from these organizations if we decide that: (a) the link would
not make us look unfavorably to ourselves or to our accredited businesses; (b) the
organization does not have any negative records with us; (c) the benefit to us from the
visibility of the hyperlink compensates the absence of Alu Project; and (d) the link is in the
context of general resource information.
We will approve link requests from these organizations if we decide that: (a) the link would not make us look unfavorably to ourselves or to our accredited businesses; (b) the organization does
not have any negative records with us; (c) the benefit to us from the visibility of the hyperlink compensates the absence of Alu Project; and (d) the link is in the context of general resource
information.
</p>
<p>
These organizations may link to our home page so long as the link: (a) is not in any way
deceptive; (b) does not falsely imply sponsorship, endorsement or approval of the linking
party and its products or services; and (c) fits within the context of the linking party's
site.
These organizations may link to our home page so long as the link: (a) is not in any way deceptive; (b) does not falsely imply sponsorship, endorsement or approval of the linking party and its
products or services; and (c) fits within the context of the linking party's site.
</p>
<p>
If you are one of the organizations listed in paragraph 2 above and are interested in linking
to our website, you must inform us by sending an e-mail to Alu Project. Please include your
name, your organization name, contact information as well as the URL of your site, a list of
any URLs from which you intend to link to our Website, and a list of the URLs on our site to
which you would like to link. Wait 2-3 weeks for a response.
If you are one of the organizations listed in paragraph 2 above and are interested in linking to our website, you must inform us by sending an e-mail to Alu Project. Please include your name,
your organization name, contact information as well as the URL of your site, a list of any URLs from which you intend to link to our Website, and a list of the URLs on our site to which you
would like to link. Wait 2-3 weeks for a response.
</p>
<p>Approved organizations may hyperlink to our Website as follows:</p>
@ -131,87 +97,60 @@ import Layout from "src/layouts/Layout.astro";
<ul>
<li>By use of our corporate name; or</li>
<li>By use of the uniform resource locator being linked to; or</li>
<li>
By use of any other description of our Website being linked to that makes sense within the
context and format of content on the linking party's site.
</li>
<li>By use of any other description of our Website being linked to that makes sense within the context and format of content on the linking party's site.</li>
</ul>
<p>
No use of Alu Project's logo or other artwork will be allowed for linking absent a trademark
license agreement.
</p>
<p>No use of Alu Project's logo or other artwork will be allowed for linking absent a trademark license agreement.</p>
<h3><strong>iFrames</strong></h3>
<p>
Without prior approval and written permission, you may not create frames around our Webpages
that alter in any way the visual presentation or appearance of our Website.
</p>
<p>Without prior approval and written permission, you may not create frames around our Webpages that alter in any way the visual presentation or appearance of our Website.</p>
<h3><strong>Content Liability</strong></h3>
<p>
We shall not be hold responsible for any content that appears on your Website. You agree to
protect and defend us against all claims that is rising on your Website. No link(s) should
appear on any Website that may be interpreted as libelous, obscene or criminal, or which
infringes, otherwise violates, or advocates the infringement or other violation of, any third
party rights.
We shall not be hold responsible for any content that appears on your Website. You agree to protect and defend us against all claims that is rising on your Website. No link(s) should appear on
any Website that may be interpreted as libelous, obscene or criminal, or which infringes, otherwise violates, or advocates the infringement or other violation of, any third party rights.
</p>
<h3><strong>Reservation of Rights</strong></h3>
<p>
We reserve the right to request that you remove all links or any particular link to our
Website. You approve to immediately remove all links to our Website upon request. We also
reserve the right to amen these terms and conditions and it's linking policy at any time. By
continuously linking to our Website, you agree to be bound to and follow these linking terms
and conditions.
We reserve the right to request that you remove all links or any particular link to our Website. You approve to immediately remove all links to our Website upon request. We also reserve the
right to amen these terms and conditions and it's linking policy at any time. By continuously linking to our Website, you agree to be bound to and follow these linking terms and conditions.
</p>
<h3><strong>Removal of links from our website</strong></h3>
<p>
If you find any link on our Website that is offensive for any reason, you are free to contact
and inform us any moment. We will consider requests to remove links but we are not obligated
to or so or to respond to you directly.
If you find any link on our Website that is offensive for any reason, you are free to contact and inform us any moment. We will consider requests to remove links but we are not obligated to or
so or to respond to you directly.
</p>
<p>
We do not ensure that the information on this website is correct, we do not warrant its
completeness or accuracy; nor do we promise to ensure that the website remains available or
that the material on the website is kept up to date.
We do not ensure that the information on this website is correct, we do not warrant its completeness or accuracy; nor do we promise to ensure that the website remains available or that the
material on the website is kept up to date.
</p>
<h3><strong>Disclaimer</strong></h3>
<p>
To the maximum extent permitted by applicable law, we exclude all representations, warranties
and conditions relating to our website and the use of this website. Nothing in this disclaimer
will:
To the maximum extent permitted by applicable law, we exclude all representations, warranties and conditions relating to our website and the use of this website. Nothing in this disclaimer will:
</p>
<ul>
<li>limit or exclude our or your liability for death or personal injury;</li>
<li>limit or exclude our or your liability for fraud or fraudulent misrepresentation;</li>
<li>
limit any of our or your liabilities in any way that is not permitted under applicable law;
or
</li>
<li>limit any of our or your liabilities in any way that is not permitted under applicable law; or</li>
<li>exclude any of our or your liabilities that may not be excluded under applicable law.</li>
</ul>
<p>
The limitations and prohibitions of liability set in this Section and elsewhere in this
disclaimer: (a) are subject to the preceding paragraph; and (b) govern all liabilities arising
under the disclaimer, including liabilities arising in contract, in tort and for breach of
statutory duty.
The limitations and prohibitions of liability set in this Section and elsewhere in this disclaimer: (a) are subject to the preceding paragraph; and (b) govern all liabilities arising under the
disclaimer, including liabilities arising in contract, in tort and for breach of statutory duty.
</p>
<p>
As long as the website and the information and services on the website are provided free of
charge, we will not be liable for any loss or damage of any nature.
</p>
<p>As long as the website and the information and services on the website are provided free of charge, we will not be liable for any loss or damage of any nature.</p>
</div>
</Layout>