Skip to content

Commit d7ad7b5

Browse files
committed
initial commit
0 parents  commit d7ad7b5

30 files changed

Lines changed: 1824 additions & 0 deletions

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.yml]
11+
indent_style = space
12+
indent_size = 2

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* text=auto
2+
*.js text eol=lf
3+
*.ai binary
4+
readme.md merge=union
5+
source/content.css merge=union

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
yarn.lock
3+
distribution
4+
.DS_Store
5+
distribution.crx
6+
distribution.pem
7+
.env

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: node_js
2+
node_js:
3+
- 'node'
4+
env:
5+
- EXTENSION_ID=lcfempbcajbebbkbhmbolpeheihejaba
6+
deploy:
7+
- provider: script
8+
skip_cleanup: true
9+
script: npm run release
10+
on:
11+
tags: true
12+
- provider: script
13+
skip_cleanup: true
14+
script: npm run release
15+
on:
16+
# Set to deploy on: cron with recent commits
17+
branch: master
18+
condition: $(npm run can-release --silent)

contributing.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Contributing
2+
3+
Suggestions and pull requests are highly encouraged! Have a look at the [open issues](https://github.com/hermanya/friendly-github/issues).
4+
## Notions
5+
6+
- You will need to be familiar with [npm](https://docs.npmjs.com/getting-started/) and [webpack](https://web-design-weekly.com/2014/09/24/diving-webpack/) to build this extension.
7+
- The extension can be loaded into Chrome or Firefox manually ([See notes below](#loading-into-the-browser))
8+
- [JSX](https://reactjs.org/docs/introducing-jsx.html) is used to create DOM elements.
9+
- All the [latest DOM APIs](https://github.com/WebReflection/dom4#features) and JavaScript features are available because the extension only has to work in the latest Chrome and Firefox. 🎉
10+
- Each JavaScript feature lives in its own file under [`source/features`](https://github.com/hermanya/friendly-github/tree/master/source/features) and it's loaded on condition in [`source/content.js`](https://github.com/hermanya/friendly-github/blob/master/source/content.js).
11+
- Some GitHub pages are loaded via AJAX/PJAX, so some features need to be in the special `ajaxedPagesHandler` function (see it as a custom "on DOM ready").
12+
- See what a _feature_ [looks like](https://github.com/hermanya/friendly-github/blob/master/source/features/show-followers-you-know.js) and [how it's loaded](https://github.com/hermanya/friendly-github/blob/master/source/content.js)
13+
- If you're making changes to the README, try to match the style of the content that's already there
14+
15+
## Workflow
16+
17+
First clone:
18+
19+
```sh
20+
git clone https://github.com/hermanya/friendly-github
21+
cd friendly-github
22+
npm install
23+
```
24+
25+
When working on the extension or checking out branches, use this to have it constantly build your changes:
26+
27+
```sh
28+
npm run watch # Listen for file changes and automatically rebuild
29+
```
30+
31+
Then load or reload it into the browser to see the changes (this does not happen automatically).
32+
33+
## Loading into the browser
34+
35+
Once built, load it in the browser of your choice:
36+
37+
<table>
38+
<tr>
39+
<th>Chrome</th>
40+
<th>Firefox</th>
41+
</tr>
42+
<tr>
43+
<td width="50%">
44+
<ol>
45+
<li>Open <code>chrome://extensions</code>;
46+
<li>Check the <strong>Developer mode</strong> checkbox;
47+
<li>Click on the <strong>Load unpacked extension</strong> button;
48+
<li>Select the folder <code>friendly-github/distribution</code>.
49+
</ol>
50+
</td>
51+
<td width="50%">
52+
<ol>
53+
<li>Open <code>about:debugging#addons</code>;
54+
<li>Click on the <strong>Load Temporary Add-on</strong> button;
55+
<li>Select the file <code>friendly-github/distribution/manifest.json</code>.
56+
</ol>
57+
</td>
58+
</tr>
59+
</table>
60+
61+
Firefox offers a more advanced loading technique that includes auto-reloading in the browser as well. Check-out [`web-ext run`](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/web-ext_command_reference#web-ext_run).

license

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) Herman Starikov <hermanstarikov@gmail.com>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

package.json

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
{
2+
"private": true,
3+
"scripts": {
4+
"lint": "xo && stylelint source/*.css",
5+
"lint-fix": "xo --fix; stylelint --fix source/*.css",
6+
"test": "npm run lint && cross-env BABEL_ENV=testing ava && run-s build",
7+
"build": "webpack --mode=production",
8+
"watch": "webpack --mode=development --watch",
9+
"release:amo": "cd distribution && webext submit",
10+
"release:cws": "cd distribution && webstore upload --auto-publish",
11+
"release": "run-s build update-version save-url release:*",
12+
"save-url": "echo https://github.com/$TRAVIS_REPO_SLUG/tree/$TRAVIS_COMMIT > distribution/SOURCE_URL",
13+
"update-version": "VERSION=$(utc-version); echo $VERSION; dot-json distribution/manifest.json version $VERSION",
14+
"can-release": "if [ \"$TRAVIS_EVENT_TYPE\" = cron ] && [ $(git rev-list -n 1 --since=\"26 hours ago\" master) ]; then echo :ship-it:; else false; fi"
15+
},
16+
"dependencies": {
17+
"copy-text-to-clipboard": "^1.0.4",
18+
"debounce-fn": "^1.0.0",
19+
"delegate": "^3.2.0",
20+
"dom-chef": "^3.2.0",
21+
"dom-loaded": "^1.0.1",
22+
"element-ready": "^3.0.0",
23+
"github-injection": "^1.0.1",
24+
"github-reserved-names": "^1.0.14",
25+
"linkify-issues": "^1.3.0",
26+
"linkify-urls": "^2.0.0",
27+
"onetime": "^2.0.1",
28+
"p-event": "^1.3.0",
29+
"select-dom": "^4.1.3",
30+
"shorten-repo-url": "^1.5.0",
31+
"storm-textarea": "2.0.1",
32+
"tiny-version-compare": "^0.9.0",
33+
"turndown": "^4.0.2",
34+
"webext-domain-permission-toggle": "0.0.2",
35+
"webext-dynamic-content-scripts": "^5.0.1",
36+
"webext-options-sync": "^0.15.1",
37+
"webextension-polyfill": "^0.2.1"
38+
},
39+
"devDependencies": {
40+
"ava": "^0.25.0",
41+
"babel-core": "^6.26.3",
42+
"babel-loader": "^7.1.4",
43+
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
44+
"babel-plugin-transform-react-jsx": "^6.24.1",
45+
"babel-plugin-transform-unicode-property-regex": "^2.0.5",
46+
"chrome-webstore-upload-cli": "^1.1.1",
47+
"common-tags": "^1.7.2",
48+
"copy-webpack-plugin": "^4.5.1",
49+
"cross-env": "^5.1.6",
50+
"dot-json": "^1.0.4",
51+
"npm-run-all": "^4.1.3",
52+
"stylelint": "^9.2.1",
53+
"stylelint-config-xo": "*",
54+
"uglifyjs-webpack-plugin": "^1.2.5",
55+
"utc-version": "^1.1.0",
56+
"webext": "^1.9.1-with-submit.1",
57+
"webpack": "^4.8.3",
58+
"webpack-cli": "^3.0.1",
59+
"xo": "^0.21.1"
60+
},
61+
"xo": {
62+
"envs": [
63+
"browser"
64+
],
65+
"rules": {
66+
"import/no-unassigned-import": "off",
67+
"no-unused-vars": [
68+
2,
69+
{
70+
"varsIgnorePattern": "^h$"
71+
}
72+
]
73+
},
74+
"globals": [
75+
"browser"
76+
]
77+
},
78+
"ava": {
79+
"files": [
80+
"test/*.js"
81+
],
82+
"require": [
83+
"babel-register"
84+
]
85+
},
86+
"babel": {
87+
"plugins": [
88+
[
89+
"transform-react-jsx",
90+
{
91+
"pragma": "h",
92+
"useBuiltIns": true
93+
}
94+
],
95+
[
96+
"transform-unicode-property-regex",
97+
{
98+
"useUnicodeFlag": true
99+
}
100+
]
101+
],
102+
"env": {
103+
"testing": {
104+
"plugins": [
105+
"transform-es2015-modules-commonjs"
106+
]
107+
}
108+
}
109+
},
110+
"stylelint": {
111+
"extends": "stylelint-config-xo",
112+
"rules": {
113+
"declaration-no-important": null,
114+
"property-no-vendor-prefix": null,
115+
"property-blacklist": null,
116+
"selector-class-pattern": null,
117+
"rule-empty-line-before": null,
118+
"at-rule-empty-line-before": null
119+
}
120+
}
121+
}

readme.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# <img src="source/icon.png" width="45" align="left"> Friendly GitHub
2+
3+
[link-travis]: https://travis-ci.org/hermanya/friendly-github
4+
5+
> Browser extension that makes GitHub a better Social Network
6+
7+
Whether we like it or not, GitHub is de-facto the Social Network for programmers. Let's make it less anti-social.
8+
9+
My hope is that GitHub will notice and implement some of these much needed improvements. So if you like any of these improvements, please email [GitHub support](mailto:support@github.com) about doing it.
10+
11+
GitHub Enterprise is also supported. More info in the options.
12+
13+
---
14+
15+
16+
## Install
17+
18+
I have not published this extension anywhere yet. You'll have to either install it from sources, or [subscribe to this issue for Chrome](https://github.com/Hermanya/friendly-github/issues/1) and [this for Firefox](https://github.com/Hermanya/friendly-github/issues/2).
19+
20+
21+
## Highlights
22+
23+
<table>
24+
<tr>
25+
<th width="50%">
26+
Show stargazers you know
27+
</th>
28+
<th width="50%">
29+
Show followers you know
30+
</th>
31+
</tr>
32+
<tr><!-- Prevent zebra stripes --></tr>
33+
<tr>
34+
<td>
35+
<img src="https://user-images.githubusercontent.com/2906365/41952167-901fad48-799c-11e8-97d1-70d363629b86.png">
36+
</td>
37+
<td>
38+
<img
39+
src="https://user-images.githubusercontent.com/2906365/42009293-b1503f62-7a57-11e8-88f5-9c2fb3651a14.png">
40+
</td>
41+
</tr>
42+
</table>
43+
44+
<table>
45+
<tr>
46+
<th width="50%">
47+
Reaction avatars showing <i>who</i> reacted to a comment
48+
</th>
49+
<th width="50%">
50+
TBD
51+
</th>
52+
</tr>
53+
<tr><!-- Prevent zebra stripes --></tr>
54+
<tr>
55+
<td>
56+
<img src="https://user-images.githubusercontent.com/1402241/34438653-f66535a4-ecda-11e7-9406-2e1258050cfa.png">
57+
</td>
58+
<td>
59+
<img
60+
src="">
61+
</td>
62+
</tr>
63+
</table>
64+
65+
### More info at a glance
66+
67+
- [Full names of comment authors are shown next to their username.](https://cloud.githubusercontent.com/assets/170270/16172068/0a67b98c-3580-11e6-92f0-6fc930ee17d1.png)
68+
69+
### UI improvements
70+
71+
- Show followers you know
72+
- Suggest similar user profiles
73+
- Show stargazers you know
74+
75+
76+
And [many more…](source/content.css)
77+
78+
79+
80+
## Customization
81+
82+
Most features can be disabled if they are JavaScript-based *(Experimental)* and you can override the CSS with your own in the extension options.
83+
84+
We're happy to receive suggestions and contributions, but be aware this is a highly opinionated project. There's a very high bar for adding options. Users will always disagree with something. That being said, we're open to discussing things. If something doesn't make the cut, you can [build your customized Friendly GitHub locally](contributing.md#workflow), rather than installing it from the Chrome Store.
85+
86+
87+
## Contribute
88+
89+
See the [contribution guide](contributing.md) and join the [contributors](https://github.com/hermanya/friendly-github/graphs/contributors)!
90+
91+
92+
## Related
93+
94+
- [Refined GitHub](https://github.com/sindresorhus/refined-github) - Improves GitHub
95+
- [Awesome browser extensions for GitHub](https://github.com/stefanbuck/awesome-browser-extensions-for-github) - Awesome list
96+
- [Octo Linker](https://github.com/octo-linker/chrome-extension/) - Navigate across files and packages
97+
- [Notifier for GitHub](https://github.com/sindresorhus/notifier-for-github-chrome) - Shows your notification unread count
98+
- [Do Not Merge WIP for GitHub](https://github.com/sanemat/do-not-merge-wip-for-github) - Prevents merging of incomplete PRs
99+
- [Contributors on GitHub](https://github.com/hzoo/contributors-on-github) - Shows stats about contributors
100+
- [Hide Files on GitHub](https://github.com/sindresorhus/hide-files-on-github) - Hides dotfiles from the file browser
101+
- [Twitter for GitHub](https://github.com/bevacqua/twitter-for-github) - Shows a user's Twitter handle on their profile page
102+
- [OctoEdit](https://github.com/DrewML/OctoEdit) - Markdown syntax highlighting in comments
103+
- [GitHub Custom Tab Size](https://github.com/lukechilds/github-custom-tab-size) - Set custom tab size for code views *(Friendly GitHub hard-codes it to 4)*
104+
- [Show All GitHub Issues](https://github.com/sindresorhus/show-all-github-issues) - Shows both Issues and Pull Requests in the Issues tab
105+
- [Notifications Preview for GitHub](https://github.com/tanmayrajani/notifications-preview-github) - See your notifications on hover on all pages
106+
- [Refined Twitter](https://github.com/sindresorhus/refined-twitter) - Improves Twitter
107+
- [GitHub Issue Link Status](https://github.com/bfred-it/github-issue-link-status) - Colorize issue and PR links to see their status (open, closed, merged)
108+
- [GitHub Follow](https://github.com/staff0rd/github-follow-extension) - Follow file renames on GitHub
109+
110+
111+
## License
112+
113+
MIT

0 commit comments

Comments
 (0)