From 3178e5cf7ea8835d1335e5110dc2a3f5cd0ead47 Mon Sep 17 00:00:00 2001 From: Gaspard Jankowiak Date: Fri, 4 Oct 2024 13:32:54 +0200 Subject: [PATCH] add Makefile --- Makefile | 18 ++++++++++++++++++ manifest.json => manifest_v2.json | 2 +- manifest_v3.json | 20 ++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Makefile rename manifest.json => manifest_v2.json (96%) create mode 100644 manifest_v3.json diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e8206ac --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +VERSION = $(shell sed -n '/"version"/s/.*\([0-9]\+\.[0-9]\+\).*/\1/p' manifest.json) +SET_VERSION = $(eval CURRENT_VERSION=$(VERSION)) + +default: v2 + +link_v2: + ln -s -f manifest_v2.json manifest.json + +link_v3: + ln -s -f manifest_v3.json manifest.json + +v2: link_v2 + $(SET_VERSION) + zip -r kf-trombi-$(CURRENT_VERSION).xpi directory.css directory.js icons manifest.json + +v3: link_v3 + $(SET_VERSION) + zip -r kf-trombi-$(CURRENT_VERSION).zip directory.css directory.js icons manifest.json diff --git a/manifest.json b/manifest_v2.json similarity index 96% rename from manifest.json rename to manifest_v2.json index 3cf7725..1f5b361 100644 --- a/manifest.json +++ b/manifest_v2.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "KF-Trombi", - "version": "0.2", + "version": "0.3", "browser_specific_settings": { "gecko": { diff --git a/manifest_v3.json b/manifest_v3.json new file mode 100644 index 0000000..4d35252 --- /dev/null +++ b/manifest_v3.json @@ -0,0 +1,20 @@ +{ + "manifest_version": 3, + "name": "KF-Trombi", + "version": "0.3", + + "description": "Generates a directory of students with photos from online.uni-graz.at", + + "icons": { + "128": "icons/icon-128-padded.png" + }, + + "content_scripts": [ + { + "matches": ["https://online.uni-graz.at/kfu_online/pl/ui/$ctx/wblvgrp.anmeldungen*"], + "js": ["directory.js"], + "css": ["directory.css"] + } + ] + +}