├── README.md ├── img ├── GitHubHovercard.png ├── Googlesearch.png ├── Imagus.png ├── Octotree.png ├── cl1024.png ├── cleanclear.png ├── codota.jpg ├── dhc.png ├── github_plus.png ├── json_handle.png ├── ua-switch.png ├── vysor.png ├── wappalyzer.png ├── xpath.png ├── yun_1.png ├── yun_2.png └── yun_3.png └── js ├── GitHub-Material-Design.js ├── Yet-Another-Weibo-Filter.js └── Youtube Auto-Subtitle-Downloader.js /README.md: -------------------------------------------------------------------------------- 1 | # 程序员必备的那些Chrome插件 2 | 3 | 4 | ### 1.CL1024 5 | 由于种种原因....「取消viidii跳转」「种子链接转化磁链接」「去帖子广告」「阅读帖子按楼数快速跳转楼层」「帖子内去掉1024的回复」「今日帖子高亮」「超大图片根据屏幕缩放」
6 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/cl1024.png)
7 | https://chrome.google.com/webstore/detail/cl1024/efdllnloheadnjjahfmdohomdphlgcjm 8 | 9 | ### 2.Click&Clean 10 | 监控浏览器的一些状态,很方便的清理缓存,历史记录等等.
11 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/cleanclear.png)
12 | https://chrome.google.com/webstore/detail/clickclean-app/pdabfienifkbhoihedcgeogidfmibmhp 13 | 14 | ### 3.DHC REST Client 15 | 可模拟网络请求的一个chrome应用,反正我觉得比postman漂亮多了。
16 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/dhc.png)
17 | https://chrome.google.com/webstore/detail/dhc-rest-client/aejoelaoggembcahagimdiliamlcdmfm 18 | 19 | ### 4.GitHub Hovercard 20 | 当鼠标放到github的某个链接是弹出改项目或者作者的信息.
21 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/GitHubHovercard.png)
22 | https://chrome.google.com/webstore/detail/github-hovercard/mmoahbbnojgkclgceahhakhnccimnplk 23 | 24 | ### 5.Google学术搜索按钮 25 | 这个不多说
26 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/Googlesearch.png)
27 | https://chrome.google.com/webstore/detail/google-scholar-button/ldipcbpaocekfooobnbcddclnhejkcpn 28 | 29 | ### 6.Imagus 30 | 当鼠标放到图片或者视频上时,自动展示大图.
31 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/Imagus.png)
32 | https://chrome.google.com/webstore/detail/imagus/immpkjjlgappgfkkfieppnmlhakdmaab 33 | 34 | ### 7.JSON-handle 35 | 很方便的解析json
36 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/json_handle.png)
37 | https://chrome.google.com/webstore/detail/json-handle/iahnhfdhidomcpggpaimmmahffihkfnj 38 | 39 | ### 8.Octotree 40 | 这个每个程序员必备.在github项目页左侧展示该项目的树结构
41 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/Octotree.png)
42 | https://chrome.google.com/webstore/detail/octotree/bkhaagjahfmjljalopjnoealnfndnagc 43 | 44 | ### 9.smartUp手势 45 | 一个更好的手势类扩展。功能包括:鼠标手势,简易拖曳,超级拖曳,摇杆手势和滚轮手势。
46 | https://chrome.google.com/webstore/detail/smartup-gestures/bgjfekefhjemchdeigphccilhncnjldn 47 | 48 | ### 10.Tampermonkey 49 | 类似firefox上的油猴子
50 | 推荐几个常用的. 51 | >* 让你的github更 material design https://github.com/jiang111/chrome-plugin-recommand/blob/master/js/GitHub-Material-Design.js 52 | 53 | >* 重新整合微博页面,屏蔽那些天天秀恩爱又不好意思取关的那些人 https://github.com/jiang111/chrome-plugin-recommand/blob/master/js/Yet-Another-Weibo-Filter.js 54 | 55 | >* 方便下载youtube的字幕,有下载字幕肯定得有下载视频的 http://www.clipconverter.cc/, https://github.com/jiang111/chrome-plugin-recommand/blob/master/js/Youtube%20Auto-Subtitle-Downloader.js 56 | https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo 57 | 58 | ### 11. Vysor (Beta) 新版本免费版分辨率明显差很多,不推荐使用 59 | android程序员必备,连接并显示安卓屏幕的内容
60 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/vysor.png)
61 | https://chrome.google.com/webstore/detail/vysor-beta/gidgenkbbabolejbgbpnhbimgjbffefm 62 | 63 | 64 | ### 12.划词翻译 65 | 支持谷歌、百度、有道、必应四大翻译和朗读引擎,可以方便的查看、复制和朗读不同引擎的翻译结果。
66 | https://chrome.google.com/webstore/detail/%E5%88%92%E8%AF%8D%E7%BF%BB%E8%AF%91/ikhdkkncnoglghljlkmcimlnlhkeamad 67 | 68 | ### 13.Holmes 69 | 更方便的书签管理器
70 | https://chrome.google.com/webstore/detail/holmes/gokficnebmomagijbakglkcmhdbchbhn 71 | 72 | ### 14.Vimium 73 | The Hacker's Browser. Vimium provides keyboard shortcuts for navigation and control in the spirit of Vim.
74 | https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb 75 | 76 | ### 15. FireBug 77 | IT前端民工必备
78 | https://chrome.google.com/webstore/detail/firebug-lite-for-google-c/bmagokdooijbeehmkpknfglimnifench 79 | 80 | ### 16.Window Resizer 81 | 可以快速调整浏览器窗口的尺寸,用于观察网站页面宽度
82 | https://chrome.google.com/webstore/detail/window-resizer/kkelicaakdanhinjdeammmilcgefonfh 83 | 84 | ### 17.PageMonitor 85 | 页面监控,如果内容有更新就通知你,你抢电子产品的时候肯定需要
86 | https://chrome.google.com/webstore/detail/visualping/pemhgklkefakciniebenbfclihhmmfcd 87 | 88 | ### 18.EyeDroper 89 | 浏览器窗口内取色
90 | https://chrome.google.com/webstore/detail/eye-dropper/hmdcmlfkchdmnmnmheododdhjedfccka 91 | 92 | ### 19.sourcegraph-chrome-extens 93 | 更好的查看github的代码,直接从源代码的引用跳至定义,更好的搜索效果。源代码搬运工福利来了! 94 | https://chrome.google.com/webstore/detail/sourcegraph-chrome-extens/dgjhfomjieaadpoljlnidmbgkdffpack 95 | 96 | ### 20.Hacker Vision 97 | 快速实现网页的黑白切换 98 | https://chrome.google.com/webstore/detail/hacker-vision/fommidcneendjonelhhhkmoekeicedej 99 | 100 | ### 21.download-any-for-github 101 | 可以下载GitHub指定文件夹和文件 102 | ![](https://raw.githubusercontent.com/onlylemi/res/master/download-any-for-github-preview.png) 103 | https://github.com/onlylemi/download-any-for-github 104 | 105 | ### 22.WEB前端助手(FeHelper) 106 | FeHelper,Chrome浏览器插件,包含一些前端实用的工具,推荐安装! 107 | ![](https://static.baidufe.com//fehelper/static/img/fehelper/wpo.png?v=1) 108 | ![](https://static.baidufe.com//fehelper/static/img/fehelper/codebeautify.png?v=1) 109 | https://www.baidufe.com/fehelper 110 | 111 | ### 23.掘金 112 | https://chrome.google.com/webstore/detail/%E6%8E%98%E9%87%91/lecdifefmmfjnjjinhaennhdlmcaeeeb 113 | 114 | ### 24.Wappalyzer 115 | 展示你访问的网页由什么技术栈所构建.
116 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/wappalyzer.png) 117 | https://chrome.google.com/webstore/detail/wappalyzer/gppongmhjkpfnbhagpmjfkannfbllamg 118 | 119 | ### 25.Codota 120 | Codota是另一款源代码搜索利器,索引了数百万公开项目的Java源代码,并能秒搜自己打的源代码,最重要的是它还提供了Chrome插件,操作更加简便!搞Java的,特别是Android的请先码住
121 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/codota.jpg) 122 | 123 | http://www.codota.com/ 124 | 125 | ### 26.GitHub Plus 126 | GitHub Plus 这个 Chrome 扩展就可以帮你轻松地下载项目中的任意单个文件了。可对比###8Octotree,个人比较喜欢Octotree 127 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/github_plus.png)
128 | https://chrome.google.com/webstore/detail/github-plus/anlikcnbgdeidpacdbdljnabclhahhmd 129 | 130 | ### 27.vue-devtools 131 | Chrome扩展调试Vue.js应用 132 | ![](https://raw.githubusercontent.com/vuejs/vue-devtools/master/media/screenshot.png) 133 | https://github.com/vuejs/vue-devtools 134 | 135 | ### 28.falcon 136 | Chrome extension for full text history search! 137 | 138 | ![](https://github.com/lengstrom/falcon/raw/master/Falcon.gif) 139 | 140 | https://github.com/lengstrom/falcon 141 | 142 | ### 29.Chrome 新插件|帮助中国开发者更便捷地浏览Google 开发者资源网站 143 | ![](http://bp.googleblog.cn/ggpt/iVs6Fr935IDyUkFwREGIT5t4If1wkv0G27_PCDSTs43hGMpppVD6l-ts-eWyusj4gxb1mB-OBRZN82LQKkYwB8trbUPxpPAxmEl1vcGyFytDKdiW-tIO7GoOE4in-jq65E6Bk7Mp) 144 | 145 | https://github.com/chenzhuo914/google-cn-devsites-extension 146 | 147 | 148 | ### 30.xpath 插件 149 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/xpath.png) 150 | 151 | https://chrome.google.com/webstore/detail/xpath-helper/hgimnogjllphhhkhlmebbmlgjoejdpjl?utm_source=chrome-ntp-icon 152 | 153 | ### 31.User-Agent Switcher for Chrome 154 | ![](https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/master/img/ua-switch.png) 155 | 156 | https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg 157 | 158 | ### 32.BaiduExporter 159 | 160 | 可以方便的把百度网盘的下载地址导出到 aria2/aria2-rpc,支持 YAAW。 161 | 162 | https://github.com/acgotaku/BaiduExporter 163 | 164 | -------------------------------------------------------------------------------- /img/GitHubHovercard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/GitHubHovercard.png -------------------------------------------------------------------------------- /img/Googlesearch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/Googlesearch.png -------------------------------------------------------------------------------- /img/Imagus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/Imagus.png -------------------------------------------------------------------------------- /img/Octotree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/Octotree.png -------------------------------------------------------------------------------- /img/cl1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/cl1024.png -------------------------------------------------------------------------------- /img/cleanclear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/cleanclear.png -------------------------------------------------------------------------------- /img/codota.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/codota.jpg -------------------------------------------------------------------------------- /img/dhc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/dhc.png -------------------------------------------------------------------------------- /img/github_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/github_plus.png -------------------------------------------------------------------------------- /img/json_handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/json_handle.png -------------------------------------------------------------------------------- /img/ua-switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/ua-switch.png -------------------------------------------------------------------------------- /img/vysor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/vysor.png -------------------------------------------------------------------------------- /img/wappalyzer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/wappalyzer.png -------------------------------------------------------------------------------- /img/xpath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/xpath.png -------------------------------------------------------------------------------- /img/yun_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/yun_1.png -------------------------------------------------------------------------------- /img/yun_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/yun_2.png -------------------------------------------------------------------------------- /img/yun_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiang111/chrome-plugin-recommand/b65b1914f3fbe392c8163b8a893254de5d4d5b8b/img/yun_3.png -------------------------------------------------------------------------------- /js/GitHub-Material-Design.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name GitHub Material Design 3 | // @namespace http://userstyles.org 4 | // @description GitHub with Material Design styling 5 | // @author dvdandroid 6 | // @homepage https://userstyles.org/styles/123952 7 | // @include http://github.com/* 8 | // @include https://github.com/* 9 | // @include http://*.github.com/* 10 | // @include https://*.github.com/* 11 | // @run-at document-start 12 | // @version 0.20160331135937 13 | // ==/UserScript== 14 | (function() {var css = [ 15 | "/*", 16 | " (c) 2012-2016 GitHub", 17 | "", 18 | " When using the GitHub logos, be sure to follow the GitHub logo guidelines (https://github.com/logos)", 19 | "", 20 | " Code License: MIT (http://choosealicense.com/licenses/mit/)", 21 | " Applies to all other files", 22 | "*/", 23 | "/*", 24 | " github-notification-bouncing", 25 | " https://github.com/muchweb/github-notification-bouncing", 26 | "*/", 27 | "", 28 | "@keyframes bounce {", 29 | " to {", 30 | " transform: scale(1.4);", 31 | " opacity: 1;", 32 | " }", 33 | "}", 34 | "@keyframes shrink {", 35 | " 0%, 50% {", 36 | " width: 14px;", 37 | " height: 14px;", 38 | " box-shadow: 0 0 8px transparent;", 39 | " }", 40 | "}", 41 | ".mail-status.unread {", 42 | " animation: bounce .5s ease-out infinite alternate, shrink 60s linear;", 43 | " width: 24px;", 44 | " height: 24px;", 45 | " opacity: 0.9;", 46 | " transform: scale(1);", 47 | " box-shadow: 0 0 8px #4183C4;", 48 | "}", 49 | "/*", 50 | " GitHub issue link inline titles", 51 | " https://userstyles.org/styles/106817/github-issue-link-inline-titles", 52 | "*/", 53 | "", 54 | ".issue-link[title]:after {", 55 | " content: attr(title);", 56 | " font-size: 0.8em;", 57 | " margin-left: 0.4em;", 58 | " margin-right: 0.6em;", 59 | " padding: 0.2em 0.4em;", 60 | " border: 1px solid #ccc;", 61 | " background: #eee;", 62 | " color: #777;", 63 | " position: relative;", 64 | " top: -1px;", 65 | "}", 66 | ".header {", 67 | " padding-top: 15px;", 68 | " padding-bottom: 15px;", 69 | "}", 70 | ".header,", 71 | ".blankslate,", 72 | ".header-logged-in,", 73 | ".org-header,", 74 | ".simple-box,", 75 | ".menu,", 76 | ".capped-card,", 77 | ".file-header,", 78 | ".file,", 79 | ".network-graph-container,", 80 | ".js-code-editor,", 81 | ".container-preview,", 82 | ".show-code,", 83 | ".auth-form-body,", 84 | ".repohead.experiment-repo-nav,", 85 | ".file-wrap,", 86 | ".branch-infobar,", 87 | ".commit-tease,", 88 | ".stats-switcher-viewport,", 89 | ".table-list,", 90 | ".table-list-header,", 91 | ".new-user-avatar-cta,", 92 | ".comment,", 93 | ".previewable-edit,", 94 | ".timeline-comment,", 95 | ".js-comment,", 96 | ".js-task-list-container,", 97 | ".owner-comment,", 98 | ".current-user,", 99 | ".activity-listing.contribution-activity.js-contribution-activity,", 100 | ".boxed-group {", 101 | " box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2) !important;", 102 | "}", 103 | ".header-nav-link {", 104 | " margin-top: 5px;", 105 | "}", 106 | ".header-logo-invertocat {", 107 | " margin-top: 3px;", 108 | "}", 109 | ".site-search,", 110 | "#your-repos-filter,", 111 | ".input-block,", 112 | ".filter_input,", 113 | ".short,", 114 | ".js-repository-name,", 115 | ".js-filterable-field,", 116 | ".select,", 117 | ".subnav-search-input,", 118 | ".input-contrast,", 119 | ".auto-search-input,", 120 | ".js-autosearch-field,", 121 | ".js-member-filter-field,", 122 | ".filename,", 123 | ".js-gist-filename,", 124 | ".js-blob-filename,", 125 | "#user_profile_name,", 126 | "#user_profile_blog,", 127 | "#user_profile_company,", 128 | "#user_profile_location,", 129 | "#user_old_password,", 130 | "#user_new_password,", 131 | "#user_confirm_new_password,", 132 | "#q {", 133 | " font-size: 14px;", 134 | " border-color: transparent !important;", 135 | " box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 1px rgba(0, 0, 0, .12) !important;", 136 | " -webkit-transition: box-shadow .2s !important;", 137 | " transition: box-shadow .2s !important;", 138 | " border-radius: 2px !important;", 139 | " box-sizing: border-box !important;", 140 | " background: white;", 141 | "}", 142 | "#rename_field {", 143 | " line-height: 8px !important;", 144 | "}", 145 | ".form-control {", 146 | " padding: 5px 8px;", 147 | " margin: 1px;", 148 | "}", 149 | ".form-control > input {", 150 | " border-color: transparent!important;", 151 | " line-height: 40px!important;", 152 | " height: 40px!important;", 153 | " box-shadow: 0 1px 1.5px rgba(0, 0, 0, .06), 0 1px 1px rgba(0, 0, 0, .12)!important;", 154 | " -webkit-transition: box-shadow .2s!important;", 155 | " transition: box-shadow .2s!important;", 156 | " border-radius: 2px!important;", 157 | " box-sizing: border-box!important;", 158 | " background: #fff!important;", 159 | " padding: 5px;", 160 | "}", 161 | ".form-control,", 162 | ".form-select {", 163 | " border: 0;", 164 | " height: 40px!important;", 165 | "}", 166 | ".header-search-wrapper {", 167 | " display: inline;", 168 | "}", 169 | ".form-control.focus,", 170 | ".form-control:focus,", 171 | ".form-select.focus,", 172 | ".form-select:focus {", 173 | " border: 0;", 174 | " outline: none;", 175 | " box-shadow: none;", 176 | "}", 177 | ".form-control {", 178 | " padding: 0;", 179 | " margin: 0;", 180 | "}", 181 | ".site-search .chromeless-input {", 182 | " width: 260px;", 183 | " height: 30px !important;", 184 | " min-height: 0;", 185 | "}", 186 | ".site-search .scope-badge {", 187 | " margin-left: 1px;", 188 | " padding: 0 5px;", 189 | " line-height: 26px;", 190 | " vertical-align: initial;", 191 | "}", 192 | ".subnav-search-input,", 193 | ".input-contrast,", 194 | ".auto-search-input,", 195 | ".js-repo-filter-field,", 196 | ".js-autosearch-field,", 197 | ".site-search form {", 198 | " width: 360px;", 199 | " padding-right: 2px;", 200 | " margin-right: 0;", 201 | "}", 202 | ".form-control.focus,", 203 | ".form-control:focus,", 204 | "input[type=\"text\"].focus,", 205 | "input[type=\"text\"]:focus,", 206 | ".focused .drag-and-drop,", 207 | "input[type=\"password\"].focus,", 208 | "input[type=\"password\"]:focus,", 209 | "input[type=\"email\"].focus,", 210 | "input[type=\"email\"]:focus,", 211 | "input[type=\"number\"].focus,", 212 | "input[type=\"number\"]:focus,", 213 | "input[type=\"tel\"].focus,", 214 | "input[type=\"tel\"]:focus,", 215 | "input[type=\"url\"].focus,", 216 | "input[type=\"url\"]:focus,", 217 | "select.focus,", 218 | "select:focus,", 219 | "textarea.focus,", 220 | "textarea:focus {", 221 | " border-color: #fff;", 222 | " box-shadow: none;", 223 | "}", 224 | ".btn,", 225 | ".subnav-item,", 226 | ".state,", 227 | ".btn-sm {", 228 | " box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 1px rgba(0, 0, 0, .12) !important;", 229 | " text-decoration: none;", 230 | " text-align: center;", 231 | " letter-spacing: 0;", 232 | " transition: .2s ease-in;", 233 | " cursor: pointer;", 234 | " display: inline-block;", 235 | "}", 236 | "input.btn {", 237 | " padding: 6px 8px;", 238 | "}", 239 | ".btn-primary,", 240 | ".btn-primary:hover {", 241 | " background-image: linear-gradient(#66BB6A, #4CAF50);", 242 | "}", 243 | ".profilecols .filter-bar {", 244 | " padding: 15px 8px 15px;", 245 | "}", 246 | ".tabnav {", 247 | " padding-bottom: 0;", 248 | " margin-bottom: 0;", 249 | "}", 250 | "body.page-profile .tab-content {", 251 | " padding-bottom: 15px;", 252 | "}", 253 | ".repo-list-item {", 254 | " padding: 30px 20px 30px 20px;", 255 | "}", 256 | ".activity-tab {", 257 | " padding-top: 15px;", 258 | "}", 259 | ".pagehead {", 260 | " padding-bottom: 0;", 261 | "}", 262 | ".tabnav-tab,", 263 | ".pagehead-tabs-item,", 264 | ".reponav-item,", 265 | ".pagehead-nav-item {", 266 | " padding: 15px 12px;", 267 | " height: 54px;", 268 | " text-transform: uppercase;", 269 | "}", 270 | ".tabnav-tabs,", 271 | ".pagehead-tabs {", 272 | " margin-bottom: 0;", 273 | "}", 274 | ".tabnav-tab.selected,", 275 | ".pagehead-tabs-item.selected,", 276 | "a.repo-filter.text-small.text-muted.js-repo-filter-tab.filter-selected,", 277 | ".reponav-item.selected,", 278 | ".pagehead-nav-item.selected {", 279 | " background-color: #f0f0f0 !important;", 280 | " border-top: 0;", 281 | " border-left: 0;", 282 | " border-right: 0;", 283 | " border-bottom: 3px solid #4285f4;", 284 | " color: #4285f4;", 285 | " margin: 2px 4px 0;", 286 | "}", 287 | ".activity-listing.contribution-activity.js-contribution-activity {", 288 | " padding: 15px;", 289 | " border-radius: 4px;", 290 | "}", 291 | "div.select-menu.right.js-menu-container.js-select-menu.js-period-container {", 292 | " padding-top: 25px;", 293 | "}", 294 | ".state {", 295 | " text-transform: uppercase;", 296 | " padding: 3px;", 297 | "}", 298 | ".state-closed,", 299 | ".bar-section-negative {", 300 | " background-color: #E53935 !important;", 301 | "}", 302 | ".state-merged,", 303 | ".bar-section-alt {", 304 | " background-color: #7B1FA2 !important;", 305 | "}", 306 | ".state-open,", 307 | ".bar-section-positive {", 308 | " background-color: #43A047 !important;", 309 | "}" 310 | ].join("\n"); 311 | if (typeof GM_addStyle != "undefined") { 312 | GM_addStyle(css); 313 | } else if (typeof PRO_addStyle != "undefined") { 314 | PRO_addStyle(css); 315 | } else if (typeof addStyle != "undefined") { 316 | addStyle(css); 317 | } else { 318 | var node = document.createElement("style"); 319 | node.type = "text/css"; 320 | node.appendChild(document.createTextNode(css)); 321 | var heads = document.getElementsByTagName("head"); 322 | if (heads.length > 0) { 323 | heads[0].appendChild(node); 324 | } else { 325 | // no head yet, stick it whereever 326 | document.documentElement.appendChild(node); 327 | } 328 | } 329 | })(); 330 | -------------------------------------------------------------------------------- /js/Youtube Auto-Subtitle-Downloader.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name Youtube Auto Subtitle Downloader 3 | // @description download youtube AUTO subtitle.(this only work on Chrome, because I don't have time for firefox compatibility, if you have time please feel free to fork github repo and send a pull request : https://github.com/1c7/Youtube-Auto-Subtitle-Download 4 | // @include http://www.youtube.com/watch?* 5 | // @include https://www.youtube.com/watch?* 6 | // @require http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js 7 | // @version 2 8 | // @namespace https://greasyfork.org/users/5711 9 | // ==/UserScript== 10 | 11 | 12 | // Author : Cheng Zheng 13 | // Author Email : guokrfans@gmail.com 14 | // Author Github : https://github.com/1c7 15 | // Last update : 2014/9/29 16 | 17 | // 作者 : 郑诚 18 | // 作者邮箱 : guokrfans@gmail.com 19 | // 作者 Github : https://github.com/1c7 20 | // 作者微博 : @糖醋陈皮 ( http://weibo.com/p/1005052004104451 ) 21 | // 最近一次升级 : 2014/9/29 22 | 23 | $(document).ready(function(){ 24 | 25 | //------------------------------------ 26 | // 27 | // 往页面上加个按钮 28 | // 29 | //------------------------------------ 30 | $("#eow-title") 31 | .append('Download Youtube Auto Subtitle | 下载Youtube自动字幕'); 32 | 33 | 34 | 35 | //------------------------------------ 36 | // 37 | // 调整一下样式 38 | // 39 | //------------------------------------ 40 | $("#YT_auto").addClass('start yt-uix-button yt-uix-button-text yt-uix-tooltip'); // 这些样式是Youtube自带的. 41 | 42 | $("#YT_auto").css('margin-top','2px'); 43 | $("#YT_auto").css('margin-left','4px'); 44 | // 有点没对齐..加点边距对齐一下.. 45 | $("#YT_auto").css('border','1px solid rgb(0, 183, 90)'); 46 | $("#YT_auto").css('cursor','pointer'); 47 | $("#YT_auto").css('color','rgb(255, 255, 255)'); 48 | $("#YT_auto").css('border-top-left-radius','3px'); 49 | $("#YT_auto").css('border-top-right-radius','3px'); 50 | $("#YT_auto").css('border-bottom-right-radius','3px'); 51 | $("#YT_auto").css('border-bottom-left-radius','3px'); 52 | $("#YT_auto").css('background-color','#00B75A'); 53 | // 为了美观的 css 样式 54 | 55 | $("#YT_auto").hover(function() { 56 | $(this).css("background-color","rgb(0, 163, 80)"); 57 | $(this).css("border","1px solid rgb(0, 183, 90)"); 58 | }); 59 | // 鼠标悬浮时改变一下背景颜色; 60 | 61 | $("#YT_auto").mouseout(function() { 62 | $(this).css("background-color","#00B75A"); 63 | }); 64 | 65 | 66 | //------------------------------------ 67 | // 68 | // 点击就下载 69 | // 70 | //------------------------------------ 71 | $("#YT_auto").click(function(){ 72 | download_subtitle(); 73 | }); 74 | 75 | 76 | }); 77 | 78 | 79 | 80 | 81 | 82 | 83 | function download_subtitle(){ 84 | 85 | var TTS_URL = unsafeWindow.yt.getConfig('TTS_URL'); 86 | // 拿到youtube代码里的TTS_URL值. 87 | 88 | var TITLE = unsafeWindow.ytplayer.config.args.title; 89 | // 拿到视频标题 90 | 91 | if (!TTS_URL){ 92 | $("#YT_auto").text("Can't Find Any Auto Subtitle | 没有英文自动字幕"); 93 | throw "No Subtitle | 没字幕"; 94 | } 95 | // 拿不到xml字幕地址的话 96 | // 就在console里面说一声, 97 | // 界面按钮上通知一下, 然后通过throw退出. 98 | // 用throw退出没啥特殊理由..就是看到这样管用而已. 99 | 100 | 101 | var xml = TTS_URL + "&type=track" + "&lang=en" + "&name" + "&kind=asr"; 102 | // 拼xml字幕链接地址 103 | 104 | 105 | 106 | $.get(xml).done(function(ret){ 107 | if(ret === ""){ 108 | $("#YT_auto").text("Can't Find Any Auto Subtitle | 没有英文自动字幕"); 109 | throw "No Subtitle | 没字幕"; 110 | } 111 | }); 112 | // 之前的几行是通过判断 TTS_URL,判断视频有没有自动字幕 113 | // 但我发现有的视频有 TTS_URL 但拼接xml字幕地址并访问后是空的。 所以我们这里多加一道 判断下返回的内容是否为空。 114 | 115 | 116 | 117 | $.get(xml).done(function(r){ 118 | 119 | 120 | var text = r.getElementsByTagName('text'); 121 | // 拿到所有的text节点 122 | 123 | var result = ""; 124 | // 保存结果的字符串 125 | 126 | 127 | for(var i=0; i '; 156 | // 标准srt时间轴: 00:00:01,850 --> 00:00:02,720 157 | // 我们现在加个中间的箭头.. 158 | 159 | 160 | 161 | var end_time = process_time( parseFloat(start) + parseFloat(dur) ); 162 | result = result + end_time + ' \r\n'; 163 | // 拿到 结束时间 之后往result字符串里存一下 164 | 165 | 166 | result = result + content + '\r\n\r\n'; 167 | // 加字幕内容 168 | 169 | } 170 | 171 | 172 | 173 | 174 | // ==== srt字幕我们已经完全处理好了, 保存在result里了, 我们现在保存到用户的电脑里就行了. ==== 175 | 176 | 177 | // 保存javascript字符到用户电脑里 178 | result = result.replace(/(

)*<\/div>/g, '\n'); 179 | result = result.replace(/
/g, ''); 180 | /* replaces some html entities */ 181 | result = result.replace(/ /g, ' '); 182 | result = result.replace(/&/g, '&'); 183 | result = result.replace(/</g, '<'); 184 | result = result.replace(/>/g, '>'); 185 | result = result.replace(/'/g, "'"); 186 | 187 | downloadFile(TITLE+".srt",result); 188 | 189 | }); 190 | 191 | 192 | 193 | } 194 | 195 | 196 | 197 | // 下面这个函数不是我写的。我之前写的那种下载方法在 Chrome 更新之后失效了。不能指定下载时的文件名。 198 | // 后来搜索了下找到这个解决方案就直接复制过来用了。 199 | // 复制自: http://www.alloyteam.com/2014/01/use-js-file-download/ 200 | function downloadFile(fileName, content){ 201 | var aLink = document.createElement('a'); 202 | var blob = new Blob([content]); 203 | var evt = document.createEvent("HTMLEvents"); 204 | evt.initEvent("click", false, false); 205 | aLink.download = fileName; 206 | aLink.href = URL.createObjectURL(blob); 207 | aLink.dispatchEvent(evt); 208 | } 209 | 210 | 211 | // 处理时间. 比如 start="671.33" start="37.64" start="12" start="23.029" 212 | // 我们处理成srt的时间, 比如 00:00:00,090 00:00:08,460 00:10:29,350 213 | function process_time(s){ 214 | 215 | s = s.toFixed(3); 216 | // 超棒的函数, 可以把不论是整数还是小数它都给你弄成3位小数形式的数字. 217 | // 举个柚子: 218 | // 671.33 -> 671.330 219 | // 671 -> 671.000 220 | // 注意, 这个函数会四舍五入. 具体可以去读文档 221 | 222 | 223 | var array = s.split('.'); 224 | // 把开始时间根据句号分割 225 | // 671.330 会分割成数组: [671, 330] 226 | 227 | 228 | var Hour = 0; 229 | var Minute = 0; 230 | var Second = array[0]; // 671 231 | var MilliSecond = array[1]; // 330 232 | // 先声明一下变量, 待会把这几个拼好就行了。 233 | 234 | 235 | 236 | // 我们来处理秒数. 把"分钟"和"小时"除出来。 237 | if(Second >= 60){ 238 | 239 | Minute = Math.floor(Second / 60); 240 | Second = Second - Minute * 60; 241 | // 我们把 秒 拆成 分钟和秒, 比如121秒, 拆成2分钟1秒 242 | 243 | Hour = Math.floor(Minute / 60); 244 | Minute = Minute - Hour * 60; 245 | // 我们把 分钟 拆成 小时和分钟, 比如700分钟, 拆成11小时40分钟 246 | 247 | } 248 | 249 | 250 | // 处理分钟,如果位数不够两位就变成两位,下面两个if语句的作用也是一样。 251 | if (Minute < 10){ 252 | Minute = '0' + Minute; 253 | } 254 | 255 | // 处理小时 256 | if (Hour < 10){ 257 | Hour = '0' + Hour; 258 | } 259 | 260 | // 处理秒 261 | if (Second < 10){ 262 | Second = '0' + Second; 263 | } 264 | 265 | return Hour + ':' + Minute + ':' + Second + ',' + MilliSecond; 266 | } 267 | --------------------------------------------------------------------------------