diff options
-rw-r--r-- | .gitignore | 18 | ||||
-rw-r--r-- | CONTRIBUTING.md | 27 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | build.ninja | 41 | ||||
-rwxr-xr-x[-rw-r--r--] | gen/png (renamed from Makefile) | 18 | ||||
-rw-r--r-- | icon.svg | 18 | ||||
-rw-r--r-- | icon128.png | bin | 626 -> 0 bytes | |||
-rw-r--r-- | icon48.png | bin | 253 -> 0 bytes | |||
-rw-r--r-- | manifest.json | 22 |
9 files changed, 103 insertions, 43 deletions
@@ -1,8 +1,26 @@ +# Copyright 2021 Benjamin Barenblat +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + # Editor backup files *~ \#* .\#* .*.swp +# Build system +.ninja_* + # Generated files +disable_keyboard_shortcuts *.zip diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index c5cb84f..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,27 +0,0 @@ -# How to Contribute - -We'd love to accept your patches and contributions to this project. There are -just a few small guidelines you need to follow. - -## Contributor License Agreement - -Contributions to this project must be accompanied by a Contributor License -Agreement. You (or your employer) retain the copyright to your contribution; -this simply gives us permission to use and redistribute your contributions as -part of the project. Head over to <https://cla.developers.google.com/> to see -your current agreements on file or to sign a new one. - -You generally only need to submit a CLA once, so if you've already submitted one -(even if it was for a different project), you probably don't need to do it -again. - -## Code reviews - -All submissions require review. We use GitHub pull requests for this purpose. -Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) -for more information on using pull requests. - -## Community Guidelines - -This project follows -[Google's Open Source Community Guidelines](https://opensource.google/conduct/). @@ -2,5 +2,3 @@ This Chrome extension lets you set keyboard shortcuts to do nothing. Just head on over to chrome://extensions/shortcuts and assign away! - -This is not an official Google product. diff --git a/build.ninja b/build.ninja new file mode 100644 index 0000000..559100a --- /dev/null +++ b/build.ninja @@ -0,0 +1,41 @@ +# Copyright 2021 Benjamin Barenblat +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + +name = disable_keyboard_shortcuts + +rule generate_png + command = gen/png $in $width $out 2>/dev/null + description = Generating $out + +rule minify_js + command = uglifyjs $in -m -o $out + description = Minifying $in + +rule minify_json + command = jq -Sc . $in >$out + description = Minifying $in + +rule zip + command = zip -qr $out $in + description = Zipping $out + +build $name/background.js: minify_js background.js +build $name/manifest.json: minify_json manifest.json +build $name/icon128.png: generate_png icon.svg + width = 128 +build $name/icon48.png: generate_png icon.svg + width = 48 + +build $name.zip: zip $name/background.js $name/manifest.json $name/icon128.png $ + $name/icon48.png @@ -1,4 +1,5 @@ -# Copyright 2019 Google LLC +#!/bin/sh +# Copyright 2021 Benjamin Barenblat # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of @@ -12,16 +13,7 @@ # License for the specific language governing permissions and limitations under # the License. -NAME = disable_keyboard_shortcuts +set -eu -FILES = background.js manifest.json icon128.png icon48.png - -$(NAME).zip: $(FILES) - mkdir $(NAME) - cp -al $(FILES) $(NAME) - zip -9r $(NAME) $(NAME) - $(RM) -r $(NAME) - -.PHONY: clean -clean: - $(RM) -r $(NAME).zip $(NAME) +inkscape -w "$2" -h "$2" -o "$3" "$1" +optipng -o7 "$3" diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..f30b96a --- /dev/null +++ b/icon.svg @@ -0,0 +1,18 @@ +<!-- Copyright 2021 Benjamin Barenblat + +Licensed under the Apache License, Version 2.0 (the "License"); you may not +use this file except in compliance with the License. You may obtain a copy of +the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations under +the License. --> + +<svg version="1.1" width="128" height="128" xmlns="http://www.w3.org/2000/svg"> + <circle cx="50%" cy="50%" r="53.5" fill-opacity="0" stroke="black" + stroke-width="5" /> +</svg> diff --git a/icon128.png b/icon128.png Binary files differdeleted file mode 100644 index 0021ccf..0000000 --- a/icon128.png +++ /dev/null diff --git a/icon48.png b/icon48.png Binary files differdeleted file mode 100644 index 5158189..0000000 --- a/icon48.png +++ /dev/null diff --git a/manifest.json b/manifest.json index 0f51c30..f47ad9b 100644 --- a/manifest.json +++ b/manifest.json @@ -21,7 +21,27 @@ "do-nothing6": { "description": "Do nothing" }, "do-nothing7": { "description": "Do nothing" }, "do-nothing8": { "description": "Do nothing" }, - "do-nothing9": { "description": "Do nothing" } + "do-nothing9": { "description": "Do nothing" }, + "do-nothinga": { "description": "Do nothing" }, + "do-nothingb": { "description": "Do nothing" }, + "do-nothingc": { "description": "Do nothing" }, + "do-nothingd": { "description": "Do nothing" }, + "do-nothinge": { "description": "Do nothing" }, + "do-nothingf": { "description": "Do nothing" }, + "do-nothingg": { "description": "Do nothing" }, + "do-nothingh": { "description": "Do nothing" }, + "do-nothingi": { "description": "Do nothing" }, + "do-nothingj": { "description": "Do nothing" }, + "do-nothingk": { "description": "Do nothing" }, + "do-nothingl": { "description": "Do nothing" }, + "do-nothingm": { "description": "Do nothing" }, + "do-nothingn": { "description": "Do nothing" }, + "do-nothingo": { "description": "Do nothing" }, + "do-nothingp": { "description": "Do nothing" }, + "do-nothingq": { "description": "Do nothing" }, + "do-nothingr": { "description": "Do nothing" }, + "do-nothings": { "description": "Do nothing" }, + "do-nothingt": { "description": "Do nothing" } }, "minimum_chrome_version": "88" } |