2023-08-12 06:23:18 +03:00
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "UTF-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< title > media< / title >
< link rel = "shortcut icon" type = "image/ico" href = "" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" / >
< meta name = "renderer" content = "webkit" / >
< meta name = "keywords" content = "media" / >
< meta name = "description" content = "PWA, Web PWA, Web App" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" / >
< meta http-equiv = "Pragma" content = "no-cache" / >
< meta http-equiv = "Window-target" content = "_top" / >
< meta http-equiv = "content-Type" content = "text/html;charset=utf-8" / >
< meta http-equiv = "Content-Language" content = "en" / >
< meta http-equiv = "imagetoolbar" content = "false" / >
< link rel = "icon" sizes = "192x192" href = "./i/t_192.png" / >
< link rel = "apple-touch-icon" href = "./i/t_96.png" / >
< meta name = "msapplication-square310x310logo" content = "./i/t_96.png" / >
< meta
name="apple-mobile-web-app-status-bar-style"
content="black-translucent"
/>
< link rel = "apple-touch-startup-image" href = "./i/t_192.png" / >
< link rel = "manifest" href = "manifest.json" / >
2023-08-12 06:37:40 +03:00
< link rel = "stylesheet" href = "./style.css" >
2023-08-12 06:23:18 +03:00
< script >
if ("serviceWorker" in navigator) {
navigator.serviceWorker
.register("./sw.js")
.then(function (registration) {
console.log(
"ServiceWorker registration successful with scope: ",
registration.scope
);
})
.catch(function (err) {
console.log("ServiceWorker registration failed: ", err);
});
}
window.addEventListener("beforeinstallprompt", function (e) {
e.userChoice.then(function (choiceResult) {
console.log(choiceResult.outcome);
if (choiceResult.outcome == "dismissed") {
console.log("User cancelled home screen install");
} else {
console.log("User added to home screen");
}
});
});
< / script >
< / head >
< body >
< p style = "color:red" > !! Please report errors, bugs and weird shit to Hajamieli !!< / p >
< form id = "userform" method = "POST" enctype = "multipart/form-data" >
< h3 > Upload a file< / h3 >
< div id = "upload-preview" > < / div >
< div id = "field" > < label class = "label" > < input type = "file" multiple = "true" accept = "image/*,video/*,.pdf,.epub" name = "media" > < span > Select an file< / span > < / label > < / div >
< input id = "submit" type = "submit" name = "upload" value = "Upload" >
< / form >
< p > styles coming soon? propably...< / p >
< div id = "results" > < / div >
2023-08-12 06:37:40 +03:00
< script src = "./script.js" type = "text/javascript" > < / script >
2023-08-12 06:23:18 +03:00
< / body >
< / html >