Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web-ext-artifacts/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
--------
Expand All @@ -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/).
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file modified dist/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/patch-ext-128-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/patch-ext-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/patch-ext-48-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/patch-ext-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "Git Patch Viewer",
"short_name": "GPV",
"description": "Git Patch Viewer",
"permissions": ["<all_urls>", "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
}
File renamed without changes.
6 changes: 3 additions & 3 deletions patch-ext/options.html → options.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ <h1 id='h1-page-title'><img id='img-logo' src='patch-ext-48x48.png'/><span id='s
<textarea id='ta-patterns'></textarea>
</article>
<article class="footer">
Last updated 2015-12-23
| <a href="https://github.com/daviddengcn/patch-ext" target="_blank">Source Code</a>
| Developed by <a href="http://daviddengcn.com/" target="_blank">David Deng</a>
Last updated 2019-11-08
| <a href="https://github.com/dlavati/patch-ext" target="_blank">Source Code</a>
| Developed by David Lavati based on <a href="https://github.com/daviddengcn/patch-ext" target="_blank">daviddengcn/patch-ext</a>
</article>
</section>

Expand Down
6 changes: 3 additions & 3 deletions patch-ext/options.js → options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")

Expand Down
23 changes: 0 additions & 23 deletions patch-ext/manifest.json

This file was deleted.

Binary file removed patch-ext/patch-ext-128x128.png
Binary file not shown.
Binary file removed patch-ext/patch-ext-48x48.png
Binary file not shown.
5 changes: 3 additions & 2 deletions testing/testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<script>
var IS_TESTING = true;
</script>
<script src="../patch-ext/cs.js"></script>
<script src="../cs.js"></script>
<script src="cases.js"></script>
</body>
</html>
</html>