add Makefile

This commit is contained in:
Gaspard Jankowiak 2024-10-04 13:32:54 +02:00
parent 640ca91459
commit 3178e5cf7e
3 changed files with 39 additions and 1 deletions

18
Makefile Normal file
View file

@ -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

View file

@ -1,7 +1,7 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "KF-Trombi", "name": "KF-Trombi",
"version": "0.2", "version": "0.3",
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {

20
manifest_v3.json Normal file
View file

@ -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"]
}
]
}