diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6311779 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +web-ext-artifacts/ diff --git a/LICENSE b/LICENSE index e06d208..a663cb5 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright 2019 Dávid Lavati Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index c5d43b4..19ea7f9 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ Git Patch Viewer ================ -A Chrome extension for rendering git patch (generated by `git format-patch`) on the webpage in the form of [Phabricator Differential](http://phabricator.org/applications/differential/). +A Firefox extension for rendering git patch (generated by `git format-patch`) on the webpage in the form of [Phabricator Differential](http://phabricator.org/applications/differential/). -The published Chrome extension is [here](https://chrome.google.com/webstore/detail/git-patch-viewer/hkoggakcdopbgnaeeidcmopfekipkleg). +The published Firefox extension is [here](https://addons.mozilla.org/addon/git-patch-ext). Features -------- @@ -14,10 +14,14 @@ Features Screenshots ----------- -![Git Patch Viewer](https://raw.githubusercontent.com/daviddengcn/patch-ext/master/dist/screenshot-1.png "Git Patch Viewer") +![Git Patch Viewer](https://raw.githubusercontent.com/dlavati/patch-ext/master/dist/screenshot-1.png "Git Patch Viewer") -![Git Patch Viewer](https://raw.githubusercontent.com/daviddengcn/patch-ext/master/dist/screenshot-2.png "Git Patch Viewer") +![Git Patch Viewer](https://raw.githubusercontent.com/dlavati/patch-ext/master/dist/screenshot-2.png "Git Patch Viewer") License ------- + Apache License V2 + +Based on [daviddengcn/patch-ext](https://github.com/daviddengcn/patch-ext) +Git Logo by [Jason Long](https://twitter.com/jasonlong) is licensed under the [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/). diff --git a/patch-ext/background.js b/background.js similarity index 100% rename from patch-ext/background.js rename to background.js diff --git a/patch-ext/cs.css b/cs.css similarity index 100% rename from patch-ext/cs.css rename to cs.css diff --git a/patch-ext/cs.js b/cs.js similarity index 100% rename from patch-ext/cs.js rename to cs.js diff --git a/dist/screenshot-2.png b/dist/screenshot-2.png index 6e7e9eb..a9b52b1 100644 Binary files a/dist/screenshot-2.png and b/dist/screenshot-2.png differ diff --git a/icons/patch-ext-128-light.png b/icons/patch-ext-128-light.png new file mode 100644 index 0000000..61fcd38 Binary files /dev/null and b/icons/patch-ext-128-light.png differ diff --git a/icons/patch-ext-128.png b/icons/patch-ext-128.png new file mode 100644 index 0000000..8bba6a3 Binary files /dev/null and b/icons/patch-ext-128.png differ diff --git a/icons/patch-ext-48-light.png b/icons/patch-ext-48-light.png new file mode 100644 index 0000000..27c9331 Binary files /dev/null and b/icons/patch-ext-48-light.png differ diff --git a/icons/patch-ext-48.png b/icons/patch-ext-48.png new file mode 100644 index 0000000..245f14a Binary files /dev/null and b/icons/patch-ext-48.png differ diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..df51182 --- /dev/null +++ b/manifest.json @@ -0,0 +1,36 @@ +{ + "name": "Git Patch Viewer", + "short_name": "GPV", + "description": "Git Patch Viewer", + "permissions": ["", "tabs"], + "icons": { + "48": "icons/patch-ext-48.png", + "128": "icons/patch-ext-128.png" + }, + "background": { + "scripts": ["background.js"] + }, + "options_ui": { + "page": "options.html" + }, + "browser_action": { + "default-icons": { + "48": "icons/patch-ext-48.png", + "128": "icons/patch-ext-128.png" + }, + "theme_icons": [ + { + "dark": "icons/patch-ext-48.png", + "light": "icons/patch-ext-48-light.png", + "size": 48 + }, + { + "dark": "icons/patch-ext-128.png", + "light": "icons/patch-ext-128-light.png", + "size": 128 + } + ] + }, + "version": "2.0.1", + "manifest_version": 2 +} diff --git a/patch-ext/options.css b/options.css similarity index 100% rename from patch-ext/options.css rename to options.css diff --git a/patch-ext/options.html b/options.html similarity index 71% rename from patch-ext/options.html rename to options.html index dbad9af..38611d2 100644 --- a/patch-ext/options.html +++ b/options.html @@ -14,9 +14,9 @@

diff --git a/patch-ext/options.js b/options.js similarity index 73% rename from patch-ext/options.js rename to options.js index 31fe390..6733d70 100644 --- a/patch-ext/options.js +++ b/options.js @@ -2,11 +2,11 @@ function ut(id, text) { document.getElementById(id).innerText = text; } -ut('span-page-title', 'Git Patch Viewer ' + chrome.app.getDetails().version); +ut('span-page-title', 'Git Patch Viewer ' + browser.runtime.getManifest().version); function send_options() { var patterns = document.getElementById('ta-patterns').value.trim().split("\n") - chrome.runtime.sendMessage({ + browser.runtime.sendMessage({ set_options:{}, options: { patterns: patterns @@ -15,7 +15,7 @@ function send_options() { } function load() { - chrome.runtime.sendMessage({get_options:{}}, function(opt) { + browser.runtime.sendMessage({get_options:{}}, function(opt) { console.log(JSON.stringify(opt)) document.getElementById('ta-patterns').value = opt.patterns.join("\n") diff --git a/patch-ext/manifest.json b/patch-ext/manifest.json deleted file mode 100644 index 2c4b881..0000000 --- a/patch-ext/manifest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "Git Patch Viewer", - "short_name": "GPV", - "description": "Git Patch Viewer", - "permissions": [ - "", - "tabs" - ], - "icons": { - "48":"patch-ext-48x48.png", - "128":"patch-ext-128x128.png" - }, - "background": { - "scripts": ["background.js"], - "persistent": false - }, - "options_page": "options.html", - "browser_action": { - "default_icon": "patch-ext-48x48.png" - }, - "version": "1.8", - "manifest_version": 2 -} diff --git a/patch-ext/patch-ext-128x128.png b/patch-ext/patch-ext-128x128.png deleted file mode 100644 index 4e84600..0000000 Binary files a/patch-ext/patch-ext-128x128.png and /dev/null differ diff --git a/patch-ext/patch-ext-48x48.png b/patch-ext/patch-ext-48x48.png deleted file mode 100644 index 2b8265b..0000000 Binary files a/patch-ext/patch-ext-48x48.png and /dev/null differ diff --git a/testing/testing.html b/testing/testing.html index 11069da..4c9dc34 100644 --- a/testing/testing.html +++ b/testing/testing.html @@ -12,7 +12,8 @@ - + - \ No newline at end of file + +