From 1e7a1cb1bf70736cf1673faa1ebc4119cb058771 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 21 Mar 2021 17:00:38 +0100
Subject: Makefile: Add a new `peniquitous.user.js` target
Don't need Browserify. Just concatenate the user script header and the
compiled `main.js`.
Rebuild the `peniquitous.user.js` user script file.
---
Makefile | 3 +++
peniquitous.user.js | 21 +++++++++++++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 59a59c2..6f5ce16 100644
--- a/Makefile
+++ b/Makefile
@@ -37,6 +37,9 @@ build/main.js: main.js.in $(addprefix build/,$(IMPORTS_BASENAME))
$< \
> $@
+peniquitous.user.js: build/main.js userscript-header.txt
+ cat userscript-header.txt build/main.js > $@
+
.PHONY: clean
clean:
rm -rf build
diff --git a/peniquitous.user.js b/peniquitous.user.js
index 4242d9d..5458d7f 100644
--- a/peniquitous.user.js
+++ b/peniquitous.user.js
@@ -21,9 +21,6 @@
// along with this program. If not, see .
-// var key_event = require('./lib/mousetrap/tests/libs/key-event.js');
-// var peniquitous = require('./peniquitous');
-
function key_event () {
var KeyEvent = function(data, type) {
this.keyCode = 'keyCode' in data ? data.keyCode : 0;
@@ -155,7 +152,23 @@ function key_event () {
}
function peniquitous () {
- key_codes = {
+// Copyright (c) 2015, 2021 Teddy Wing
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+
+ var key_codes = {
p: 80,
n: 78,
UP_ARROW: 38,
--
cgit v1.2.3