├── .gitignore ├── LICENSE ├── README.md ├── create.html └── index.php /.gitignore: -------------------------------------------------------------------------------- 1 | conf.php 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Simon Forsberg 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CodeReview-Shield [](http://codereview.stackexchange.com/q/95459/31562) 2 | 3 | get a shields.io-like 'shield' for your Code Review question 4 | 5 | # Usage 6 | 7 | Add this to your GitHub repository `README.md` file, or anywhere else that supports markdown: 8 | 9 | [](http://codereview.stackexchange.com/q/qqqqq/uuuuuuu) 10 | 11 | Replace `qqqqq` with the question id and `uuuuuuu` with your user id. 12 | 13 | The quickest way to create your shield is to use the [Code Review Shield creator](http://www.zomis.net/codereview/shield/create.html) and paste the 'share' link for your question. 14 | 15 | # Modes 16 | 17 | By default, the shield decides the mode depending on the status of the question. 18 | 19 | - If the question does not have any answers, the mode `score` is used with red background 20 | - If the question has answers but no accepted answers, the mode `answers` is used with orange background 21 | - If the question has an accepted answer, the mode `views` is used with green background 22 | 23 | You can specify the mode yourself in the URL by using `&mode=yourmode`, for example: 24 | 25 | ### score mode 26 | 27 | [](http://codereview.stackexchange.com/q/95459/31562) 28 | 29 | [](http://codereview.stackexchange.com/q/95459/31562) 30 | 31 | ### answers mode 32 | 33 | [](http://codereview.stackexchange.com/q/95459/31562) 34 | 35 | [](http://codereview.stackexchange.com/q/95459/31562) 36 | 37 | ### views mode 38 | 39 | [](http://codereview.stackexchange.com/q/95459/31562) 40 | 41 | [](http://codereview.stackexchange.com/q/95459/31562) 42 | -------------------------------------------------------------------------------- /create.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |8 | Convert the 'share' link to a Code Review Shield. 9 | Input something like 10 |
http://codereview.stackexchange.com/q/95459/3156211 | 12 |