Compare commits

..

No commits in common. "main" and "v0.0.1" have entirely different histories.
main ... v0.0.1

8 changed files with 29 additions and 157 deletions

18
.gitignore vendored
View File

@ -1,18 +0,0 @@
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"editor.maxTokenizationLineLength": 100000000000000000000
}

View File

@ -1,13 +0,0 @@
ENCODED_IMAGES := $(wildcard assets/*.png.64)
IMAGES := $(patsubst assets/%.png.64, images/%.png, $(ENCODED_IMAGES))
out: $(IMAGES)
images/:
mkdir $@
echo '*' > images/.gitignore
images/%.png: assets/%.png.64 | images/
base64 -d $< > $@

View File

@ -2,15 +2,11 @@
"manifest_version": 3,
"name": "browser-milje",
"description": "adds a milje table cloth on top of your browser viewport",
"version": "0.0.2",
"permissions": ["storage", "activeTab", "scripting"],
"version": "0.0.1",
"action": {
"default_popup": "popup.html",
"default_icon": "assets/browser-milje.png"
},
"background": {
"service_worker": "background.js"
},
"icons": {
"16": "assets/icon-16.png",
"32": "assets/icon-32.png",
@ -19,13 +15,8 @@
},
"content_scripts": [
{
"matches": ["<all_urls>", "file:///"],
"js": ["scripts/milje.js", "scripts/contentScript.js"]
}
],
"browser_specific_settings": {
"gecko": {
"id": ""
}
"js": ["scripts/milje.js"],
"matches": ["<all_urls>", "file:///"]
}
]
}

View File

@ -25,11 +25,6 @@
<body>
<h1>browser-milje!</h1>
<img id="milje" src="assets/milje.png" alt="this should represent the milje">
<input type="file" id="fileInput" accept="image/*">
<button id="uploadButton">upload milje!</button>
<div id="miljeGallery">
</div>
<script src="milje.js"></script>
</body>
</html>

View File

@ -1,5 +0,0 @@
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
if (message.type === "setMilje") {
document.body.style.background = `url(${message.milje})`;
}
});

File diff suppressed because one or more lines are too long

View File

@ -1,13 +0,0 @@
document.getElementById('uploadButton').addEventListener('click', async () => {
const miljeInput = document.getElementById('fileInput');
const milje = miljeInput.files[0];
if(!milje) {
alert("Please select a milje.");
return;
}
const base64Milje = await convertImageToBase64(milje);
await saveImage(base64Milje);
await displayImage(base64Milje);
})