├── .gitignore ├── assets ├── 1_after.png └── 1_before.png ├── public ├── icon │ ├── icon_128x128.png │ ├── icon_16x16.png │ └── icon_64x64.png ├── manifest.json └── index.html ├── src ├── index.ts └── ui.ts ├── .github └── ISSUE_TEMPLATE │ ├── Bur_report.md │ └── Feature_request.md ├── .travis.yml ├── jest.config.js ├── webpack ├── webpack.prod.js ├── webpack.dev.js └── webpack.common.js ├── tsconfig.json ├── .eslintrc ├── .vscode ├── settings.json └── tasks.json ├── LICENSE ├── package.json ├── README.md └── scripts └── deploy.js /.gitignore: -------------------------------------------------------------------------------- 1 | npm-debug.log 2 | node_modules/ 3 | dist/ 4 | tmp/ 5 | pretty-octo.zip -------------------------------------------------------------------------------- /assets/1_after.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbee37142/pretty-octo/HEAD/assets/1_after.png -------------------------------------------------------------------------------- /assets/1_before.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbee37142/pretty-octo/HEAD/assets/1_before.png -------------------------------------------------------------------------------- /public/icon/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbee37142/pretty-octo/HEAD/public/icon/icon_128x128.png -------------------------------------------------------------------------------- /public/icon/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbee37142/pretty-octo/HEAD/public/icon/icon_16x16.png -------------------------------------------------------------------------------- /public/icon/icon_64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbee37142/pretty-octo/HEAD/public/icon/icon_64x64.png -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import * as $ from "jquery"; 2 | import * as ui from "./ui"; 3 | 4 | $(function () { 5 | ui.apply(); 6 | }); 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bur_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🐛 Bug report 3 | about: Report to bug or error! 4 | --- 5 | 6 | ## Description 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "8" 4 | cache: 5 | directories: 6 | - "node_modules" 7 | script: 8 | - npm build 9 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "roots": [ 3 | "src" 4 | ], 5 | "transform": { 6 | "^.+\\.ts$": "ts-jest" 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /src/ui.ts: -------------------------------------------------------------------------------- 1 | import * as $ from "jquery"; 2 | 3 | export function apply() { 4 | // 1. Apply narrow navbar with container-xl (max-width) 5 | $("main > div").addClass("container-xl"); 6 | } 7 | -------------------------------------------------------------------------------- /webpack/webpack.prod.js: -------------------------------------------------------------------------------- 1 | const merge = require("webpack-merge"); 2 | const common = require("./webpack.common.js"); 3 | 4 | module.exports = merge(common, { 5 | mode: "production", 6 | }); 7 | -------------------------------------------------------------------------------- /webpack/webpack.dev.js: -------------------------------------------------------------------------------- 1 | const merge = require("webpack-merge"); 2 | const common = require("./webpack.common.js"); 3 | 4 | module.exports = merge(common, { 5 | devtool: "inline-source-map", 6 | mode: "development", 7 | }); 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🌈 Feature request 3 | about: Things you might want to try to improve or add to in this extension. 4 | --- 5 | 6 | ## Description 7 | 8 | ### Request Feature 9 | 10 | ### Reference 11 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "noImplicitAny": false, 6 | "sourceMap": false, 7 | "rootDir": "src", 8 | "outDir": "dist/js", 9 | "noEmitOnError": true, 10 | "typeRoots": [ "node_modules/@types" ] 11 | } 12 | } -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-multiple-empty-lines": "error", 4 | "comma-dangle": ["error", "always-multiline"], 5 | "eol-last": ["error", "always"], 6 | "semi": ["error", "never"], 7 | "quotes": ["error", "single"], 8 | "no-tabs": "error", 9 | "padding-line-between-statements": [ 10 | "error", 11 | { "blankLine": "always", "prev": "*", "next": "return" } 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "./node_modules/typescript/lib", 3 | "eslint.options": { 4 | "extensions": [".html", ".ts", ".js", ".tsx"] 5 | }, 6 | "files.autoSaveDelay": 500, 7 | "eslint.packageManager": "npm", 8 | 9 | "editor.codeActionsOnSave": { 10 | "source.fixAll.eslint": true, 11 | "source.organizeImports": true 12 | }, 13 | "files.eol": "\n", 14 | "json.schemas": [ 15 | { 16 | "fileMatch": ["/manifest.json"], 17 | "url": "http://json.schemastore.org/chrome-manifest" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "version": "0.0.7", 4 | "name": "pretty-octo", 5 | "description": "Chrome Extension for GitHub UX", 6 | "browser_action": { 7 | "default_icon": "icon/icon_16x16.png", 8 | "default_popup": "index.html" 9 | }, 10 | "icons": { 11 | "16": "icon/icon_16x16.png", 12 | "48": "icon/icon_64x64.png", 13 | "128": "icon/icon_128x128.png" 14 | }, 15 | "homepage_url": "https://github.com/JaeYeopHan/pretty-octo", 16 | "content_scripts": [ 17 | { 18 | "matches": ["https://github.com/*"], 19 | "run_at": "document_end", 20 | "js": ["js/vendor.js", "js/main.js"] 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /webpack/webpack.common.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const CopyPlugin = require("copy-webpack-plugin"); 3 | const srcDir = "../src/"; 4 | 5 | module.exports = { 6 | entry: { 7 | main: path.join(__dirname, srcDir + "index.ts"), 8 | }, 9 | output: { 10 | path: path.join(__dirname, "../dist/js"), 11 | filename: "[name].js", 12 | }, 13 | optimization: { 14 | splitChunks: { 15 | name: "vendor", 16 | chunks: "initial", 17 | }, 18 | }, 19 | module: { 20 | rules: [ 21 | { 22 | test: /\.tsx?$/, 23 | use: "ts-loader", 24 | exclude: /node_modules/, 25 | }, 26 | ], 27 | }, 28 | resolve: { 29 | extensions: [".ts", ".tsx", ".js"], 30 | }, 31 | plugins: [new CopyPlugin([{ from: ".", to: "../" }], { context: "public" })], 32 | }; 33 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "command": "npm", 6 | "tasks": [ 7 | { 8 | "label": "install", 9 | "type": "shell", 10 | "command": "npm", 11 | "args": ["install"] 12 | }, 13 | { 14 | "label": "update", 15 | "type": "shell", 16 | "command": "npm", 17 | "args": ["update"] 18 | }, 19 | { 20 | "label": "test", 21 | "type": "shell", 22 | "command": "npm", 23 | "args": ["run", "test"] 24 | }, 25 | { 26 | "label": "build", 27 | "type": "shell", 28 | "group": "build", 29 | "command": "npm", 30 | "args": ["run", "watch"] 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Tomofumi Chiba 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 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | pretty-octo 6 | 28 | 29 | 30 | 31 | 32 |
33 | 34 |

Pretty-octo

35 |
36 |
Chrome Extension for GitHub UX
37 | 38 | https://github.com/JaeYeopHan/pretty-octo 39 | 40 |
41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pretty-octo", 3 | "version": "0.0.1", 4 | "description": "Chrome Extension for pretty GitHub UX", 5 | "main": "index.js", 6 | "scripts": { 7 | "deploy:real": "npm-run-all _versioning build _clean:zip _zipify dashboard", 8 | "dashboard": "open https://chrome.google.com/webstore/devconsole", 9 | "watch": "webpack --config webpack/webpack.dev.js --watch", 10 | "build": "webpack --config webpack/webpack.prod.js", 11 | "clean": "rimraf dist", 12 | "test": "npx jest", 13 | "_clean:zip": "rm -rf pretty-octo.zip", 14 | "_zipify": "zip -r pretty-octo.zip dist", 15 | "_versioning": "node ./scripts/deploy.js" 16 | }, 17 | "author": "", 18 | "license": "MIT", 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/JaeYeopHan/github-ux-enhancer.git" 22 | }, 23 | "dependencies": { 24 | "jquery": "^3.5.0" 25 | }, 26 | "devDependencies": { 27 | "@types/chrome": "0.0.100", 28 | "@types/jest": "^25.1.4", 29 | "@types/jquery": "^3.3.33", 30 | "copy-webpack-plugin": "^5.1.1", 31 | "inquirer": "^7.2.0", 32 | "jest": "^25.1.0", 33 | "npm-run-all": "^4.1.5", 34 | "open": "^7.0.4", 35 | "prettier": "^2.0.5", 36 | "rimraf": "^3.0.2 ", 37 | "signale": "^1.4.0", 38 | "ts-jest": "^25.2.1 ", 39 | "ts-loader": "^6.2.1", 40 | "typescript": "~3.8.3 ", 41 | "webpack": "~4.42.0", 42 | "webpack-cli": "~3.3.11", 43 | "webpack-merge": "~4.2.2" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![pretty-octo](./public/icon/icon_128x128.png) 2 | 3 | # pretty-octo 4 | 5 | [![extension-version](https://badgen.net/chrome-web-store/v/pnjndmenjdnlkffafgfbdfegmpjjbjdm)](https://chrome.google.com/webstore/detail/octodirect/pnjndmenjdnlkffafgfbdfegmpjjbjdm?hl=ko) [![price](https://badgen.net/chrome-web-store/price/pnjndmenjdnlkffafgfbdfegmpjjbjdm)](https://chrome.google.com/webstore/detail/octodirect/pnjndmenjdnlkffafgfbdfegmpjjbjdm?hl=ko) [![star_of_extension](https://badgen.net/chrome-web-store/stars/pnjndmenjdnlkffafgfbdfegmpjjbjdm)](https://chrome.google.com/webstore/detail/octodirect/pnjndmenjdnlkffafgfbdfegmpjjbjdm?hl=ko) 6 | 7 | Chrome Extension for pretty GitHub UI/UX 8 | 9 | ## Install 10 | 11 | Chrome Extension > [Link](https://chrome.google.com/webstore/detail/pretty-octo/pnjndmenjdnlkffafgfbdfegmpjjbjdm?hl=ko) 12 | 13 | ## Features 14 | 15 | ### UI 16 | 17 | #### ✅ Apply narrow styles 18 | 19 | Apply narow styles to GitHub navbar (with `container-xl`) 20 | 21 | | **Before** | **After** | 22 | | :------------------------------: | :----------------------------: | 23 | | ![1_before](assets/1_before.png) | ![1_after](assets/1_after.png) | 24 | 25 | > To be continued... ([> issue](https://github.com/JaeYeopHan/pretty-octo/issues/new?template=Feature_request.md)) 26 | 27 | ### Based on 28 | 29 | - [chrome-extension-typescript-starter](https://github.com/chibat/chrome-extension-typescript-starter) 30 | 31 | ## Show your support 32 | 33 | Give a ⭐️ if this project helped you! 34 | 35 |
36 | 37 | Written by @Jbee 38 | 39 | 40 |
41 | -------------------------------------------------------------------------------- /scripts/deploy.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const inquirer = require("inquirer"); 3 | const signale = require("signale"); 4 | const { promisify } = require("util"); 5 | const exec = promisify(require("child_process").exec); 6 | 7 | const manifestPath = "./public/manifest.json"; 8 | const manifestJsonFile = fs.readFileSync(manifestPath, { 9 | encoding: "utf-8", 10 | }); 11 | const manifestJson = JSON.parse(manifestJsonFile); 12 | const version = manifestJson.version; 13 | 14 | signale.note(`Current version: v${version}`); 15 | 16 | inquirer 17 | .prompt([ 18 | { 19 | type: "list", 20 | name: "type", 21 | message: "Select deploy type: ", 22 | choices: ["patch", "minor", "major"], 23 | }, 24 | ]) 25 | .then(async ({ type }) => { 26 | const updatedVersion = updateVersion(type, version); 27 | 28 | manifestJson.version = updatedVersion; 29 | 30 | fs.writeFileSync(manifestPath, JSON.stringify(manifestJson)); 31 | 32 | signale.note(`=> New version: v${updatedVersion}\n`); 33 | 34 | await applyPrettier(); 35 | signale.note(`Complete to update version. start to release!\n`); 36 | await release(updatedVersion); 37 | }); 38 | 39 | function updateVersion(type, version) { 40 | const splittedVersion = version.split("."); 41 | const patchTarget = splittedVersion[2]; 42 | const minorTarget = splittedVersion[1]; 43 | const majorTarget = splittedVersion[0]; 44 | 45 | switch (type) { 46 | case "patch": 47 | return [majorTarget, minorTarget, Number(patchTarget) + 1].join("."); 48 | case "minor": 49 | return [majorTarget, Number(minorTarget) + 1, 0].join("."); 50 | case "major": 51 | return [Number(majorTarget) + 1, 0, 0].join("."); 52 | } 53 | } 54 | 55 | async function release(version) { 56 | try { 57 | await commit(version); 58 | await tag(version); 59 | await push(); 60 | await pushTag(); 61 | signale.success("release completed!"); 62 | } catch (e) { 63 | signale.warn("Fail to commit or push!", e); 64 | return false; 65 | } 66 | } 67 | 68 | async function commit(version) { 69 | return exec( 70 | [ 71 | `git commit`, 72 | `--allow-empty`, 73 | `-m ':tada: v${version}'`, 74 | `${manifestPath}`, 75 | ].join(" ") 76 | ); 77 | } 78 | 79 | async function push() { 80 | return exec("git push"); 81 | } 82 | 83 | async function tag(version) { 84 | return exec(`git tag ${version}`); 85 | } 86 | 87 | async function pushTag() { 88 | return exec(`git push --tags`); 89 | } 90 | 91 | async function applyPrettier() { 92 | return exec("prettier --write ./public/manifest.json"); 93 | } 94 | --------------------------------------------------------------------------------