Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Ignore the build target
build/
Autopod_firefox_extension_*
5 changes: 4 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
image:
file: gitpod/debian.Dockerfile
file: gitpod/debian.Dockerfile
vscode:
extensions:
- streetsidesoftware.code-spell-checker@1.8.0:pOcw5Mko+D583rMKG2b1PQ==
4 changes: 4 additions & 0 deletions .theia/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// FIXME: File a bug to cSpell to allow `word's`
"cSpell.userWords": [ "gitpod", "Hrbek", "gitpod's", "Kreyren", "Kreyren's", "Krey", "Krey's", "Autopod" ]
}
26 changes: 17 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,29 @@ all:
$(info The 'make' is configured to not work without arguments in $(NAME) project)
@ exit 2

build: build-userstyle build-firefox-extension

# FIXME-QA: Sanitize
build: build-firefox-extension
$(info Building autopod targets.. )
build-userstyle:
$(info Building autopod targets )
@ mkdir build || true
@ m4 --prefix-builtins src/autopod.m4 > build/automail.js
@ date +"%s" | sed 's_^_//Automail built at _' >> build/automail.js
@ rm build/userModules.js
$(info Autopod has been sucessfully built)
$(info Generating javascript file )
@ m4 --prefix-builtins src/autopod.m4 > build/autopod.js
$(info Appending time built )
@ date +"%s" | sed 's_^_//Autopod built at _' >> build/autopod.js
$(info Autopod's userstyle has been sucessfully built)

build-firefox-extension:
$(info Creating Firefox addon)
$(info Creating Firefox extension)
@ cp -r icons/ build/icons
@ zip -r $(NAME)_firefox_extension_$(VERSION).$(PATCHLEVEL).$(SUBLEVEL).zip autopod.js icons/ src/manifest.json
@ mv $(NAME)_firefox_extension_$(VERSION).$(PATCHLEVEL).$(SUBLEVEL).zip $(NAME)_firefox_extension_$(VERSION).$(PATCHLEVEL).$(SUBLEVEL).xpi
$(info Packaging Firefox extension)
@ rm Autopod_firefox_extension* || true
@ cp src/manifest.json build/
@ cd build && zip -r ../$(NAME)_firefox_extension_$(VERSION).$(PATCHLEVEL).$(SUBLEVEL).zip .
$(info Firefox extension has been successfully packaged in the root of the repository)

# FIXME-QA: Sanitize the Autopod_firefox_Extension removal
clean:
@ rm -r build || true
@ rm Autopod_firefox_extension* || true
$(info Build target has been cleared successfully)
2 changes: 2 additions & 0 deletions gitpod/debian.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM debian:latest

# FIXME: Requires novnc configuration
# FIXME: Get Firefox and chromium to test this

USER root

# Get core packages
Expand Down
26 changes: 19 additions & 7 deletions src/autopod.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ m4_define(NAME,autopod)
m4_define(VERSION,1.00)
m4_divert(0)m4_dnl
// ==UserScript==
// @name Autopod
// @name NAME
// @namespace http://tampermonkey.net/
// @version VERSION
// @description Various non-standard utilities for gitpod.io and gitpod-staging.com
// @author hoh
// @author hoh, kreyren
// @grant GM_xmlhttpRequest
// @match https://gitpod.io/*
// @license GPLv3
// ==/UserScript==
Expand All @@ -29,12 +30,23 @@ const scriptInfo = {
// A collection of non-standard utilities for gitpod.io

/* GENERAL STRUCTURE:
1. Settings
(1. Settings)
2. CSS
3. tools and helper functions
4. The modules, as individual callable functions
5. The URL matcher, for making the modules run at the right sites
6. Module descriptions
(3. The modules, as individual callable functions)
*/
m4_include(src/core.js)
let style = document.createElement("style");
style.id = "autopod-styles";
style.type = "text/css";

style.textContent = `
m4_include(src/css/global.css)
`;
let documentHead = document.querySelector("head");
if(documentHead){
documentHead.appendChild(style)
}
else{
return//xml documents or something. At least it's not a place where the script can run
}
})()
10 changes: 10 additions & 0 deletions src/core.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Make sure that localStorage is available to us
// FIXME-QA: Peer-review required
try{
localStorage.setItem("test","test");
localStorage.removeItem("test");
}
catch(e){
alert("Error: LocalStorage not available.");
console.log("LocalStorage, required for saving settings, is not available. Terminating Autopod.")
}
121 changes: 0 additions & 121 deletions src/utilities/colourPicker.js

This file was deleted.

54 changes: 0 additions & 54 deletions src/utilities/displayBox.js

This file was deleted.

45 changes: 0 additions & 45 deletions src/utilities/levDist.js

This file was deleted.

Loading