diff --git a/HISTORY.md b/HISTORY.md index 69e4cc2..9c2e4d4 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,30 @@ +### v2.4.3 +* Fix issue branch path not encoded in file navigation + +### v2.4.2 +* Fix issue download icon not shown upon hover + +### v2.4.1 +* Support file icons + +### v2.3.3 +* Handle local storage error + +### v2.3.2 +* Improve file navigation speed in pull requests + +### v2.3.1 +* Fix bug PR mode doesn't work with lazy loading +* Fix bug sidebar width is not stable in Firefox + +### v2.3.0 +* Support PR viewing mode +* Handle reserved chars in URLs + +### v2.2.0 +* Support BitBucket (experimental) +* Fix minor bugs + ### v2.1.0 * Remove GitLab support * Improve GitHub styling diff --git a/README.md b/README.md index 8fe297f..a4b9c53 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,30 @@ -[![OpenCollective](https://opencollective.com/octotree/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/octotree/sponsors/badge.svg)](#sponsors) +[![OpenCollective](https://opencollective.com/octotree/backers/badge.svg)](#backers) + ## GitCodeTree fork from [https://github.com/buunguyen/octotree](https://github.com/buunguyen/octotree) -### 二次开发 +## 安装 +### 从预先构建的包安装(适用于所有浏览器) + **鉴于国内墙的原因,你可以通过下载已经构建好的包来安装** + +预先构建的包可以从 [https://gitee.com/oschina/GitCodeTree/tree/master/dist](https://gitee.com/oschina/GitCodeTree/tree/master/dist) 下载。出于安全原因,请不要从其它地方下载。 + +__注意__: Firefox 43 + 需要签名。因此您需要从Mozilla商店安装GitCodeTree。出于某种原因,如果你想安装预先构建的包,请参考 [disable sign-check](https://github.com/buunguyen/octotree/issues/220#issuecomment-166012724)。 + +### 在 Chrome, Firefox 和 Opera 上安装 +* 从 [Chrome Web Store](https://chrome.google.com/webstore/detail/gitcodetree/inaaldjpdbkaodlmdcplgpoibohcmmlj),[Mozilla Add-ons Store](https://addons.mozilla.org/zh-CN/firefox/addon/GitCodeTree/) or [Opera Add-ons Store](https://addons.opera.com/en/extensions/details/gitcodetree/) 安装GitCodeTree +* 导航到任何Gitee、GitHub库(或者刷新这个页面作为一个例子) +* 代码树将显示在页面左边 + +### 在 Safari 上安装 + +GitCodeTree在Safari gallery中不可用;所以,您必须使用预先构建的包 或者 从源代码构建一个。 + +* 下载 [Safari 预先构建的包](https://gitee.com/oschina/GitCodeTree/blob/master/dist/safari.safariextz?raw=true) +* 双击或者拖拽到Safari窗口 + -* 将项目clone到本地 -* 在`src/adapters/`中为你想要支持的网站添加一个类(可复制`src/adapters/github.js`并修改) -* 根据情况实现 [`_getTree`](https://gitee.com/inu1255/GitCodeTree/blob/master/src/adapters/github.js#L149-154) 或 `_get` 方法,用于获取项目树 -* 实现 [`updateLayout`](https://gitee.com/inu1255/GitCodeTree/blob/master/src/adapters/github.js#L65-73) 方法,用于修改页面布局 -* 实现 [`selectFile`](https://gitee.com/inu1255/GitCodeTree/blob/master/src/adapters/github.js#L135-138) 指定pjax替换的html元素,用于不刷新切换文件 -* 在 [`src/octotree.js`](https://gitee.com/inu1255/GitCodeTree/blob/master/src/octotree.js#L30)中添加你修改好的类 -* 在 `src/config/` 插件配置文件中添加你想要支持的网站 -* __chrome中调试__: 使用`gulp chrome`命令,打开[chrome://extensions/](chrome://extensions/),点击`加载已解压的扩展程度`,选择`src/tmp/chrome` -* __打包__: 使用 `gulp dist` 命令打包 ## 介绍 @@ -28,44 +38,41 @@ fork from [https://github.com/buunguyen/octotree](https://github.com/buunguyen/o ![GitCodeTree on GitHub](docs/chrome-github.png) -### 在 Chrome, Firefox 和 Opera 上安装 -* 从 [Chrome Web Store](https://chrome.google.com/webstore/detail/gitcodetree/inaaldjpdbkaodlmdcplgpoibohcmmlj), [Mozilla Add-ons Store](https://addons.mozilla.org/zh-CN/firefox/addon/GitCodeTree/) or [Opera Add-ons Store](https://addons.opera.com/zh-cn/extensions/details/gitcodetree/?display=en) 安装GitCodeTree -* 导航到任何Gitee、GitHub库(或者刷新这个页面作为一个例子) -* 代码树将显示在页面左边 +### 二次开发 -### 在 Safari 上安装 +* 将项目clone到本地 +* 在`src/adapters/`中为你想要支持的网站添加一个类(可复制`src/adapters/github.js`并修改) +* 根据情况实现 [`_getTree`](https//gitee.com/inu1255/GitCodeTree/blob/master/src/adapters/github.js#L149-154) 或 `_get` 方法,用于获取项目树 +* 实现 [`updateLayout`](https//gitee.com/inu1255/GitCodeTree/blob/master/src/adapters/github.js#L65-73) 方法,用于修改页面布局 +* 实现 [`selectFile`](https//gitee.com/inu1255/GitCodeTree/blob/master/src/adapters/github.js#L135-138) 指定pjax替换的html元素,用于不刷新切换文件 +* 在 [`src/octotree.js`](https//gitee.com/inu1255/GitCodeTree/blob/master/src/octotree.js#L30)中添加你修改好的类 +* 在 `src/config/` 插件配置文件中添加你想要支持的网站 +* __chrome中调试__: 使用`gulp chrome`命令,打开[chrome://extensions/](chrome://extensions/),点击`加载已解压的扩展程度`,选择`src/tmp/chrome` +* __打包__: 使用 `gulp dist` 命令打包 -GitCodeTree在Safari gallery中不可用;所以,您必须使用预先构建的包 或者 从源代码构建一个。 -* 下载 [Safari 预先构建的包](https://gitee.com/inu1255/GitCodeTree/blob/master/dist/safari.safariextz?raw=true) -* 双击或者拖拽到Safari窗口 -### 从预先构建的包安装(所有浏览器) - -预先构建的包可以从 [这里](https://gitee.com/inu1255/GitCodeTree/tree/master/dist) 下载. 出于安全原因,请不要从其它地方下载. - -__注意__: Firefox 43 + 需要签名。因此您需要从Mozilla商店安装GitCodeTree。出于某种原因,如果你想安装预先构建的包, 请参考 [disable sign-check](https://github.com/buunguyen/octotree/issues/220#issuecomment-166012724). ## 设置 ### Access Token -__注意__: GitCodeTree 访问令牌在浏览器本地存储并不会上传到任何地方。如果你想验证,查看源代码,开始 [请参考这里](https://gitee.com/inu1255/GitCodeTree/blob/master/src/view.options.js#L77). +__注意__: GitCodeTree 访问令牌在浏览器本地存储并不会上传到任何地方。如果你想验证,查看源代码,开始 [请参考这里](https//gitee.com/inu1255/GitCodeTree/blob/master/src/view.options.js#L77). #### GitHub -GitCodeTree 使用 [GitHub API](https://developer.github.com/v3/) 检索代码树。默认情况下,它使未经身份验证的请求到GitHub API。然而,有两种情况时必须经过身份验证的请求: +GitCodeTree 使用 [GitHub API](https://developer.github.com/v3/) 检索代码树。默认情况下,它使未经身份验证的请求到GitHub API。然而,有两种情况时必须经过身份验证的请求: * 你访问一个私人存储库 * 你超过 [请求频率限制限制](https://developer.github.com/v3/#rate-limiting) -当这种情况发生时,GitCodeTree会询问你 [GitHub 私人 access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use). 如果你没有, [点此创建](https://github.com/settings/tokens/new), 然后复制粘贴到文本框中。注意,至少要允许"public_repo","repo" (如果你需要访问私人仓库). +当这种情况发生时,GitCodeTree会询问你 [GitHub 私人 access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use). 如果你没有,[点此创建](https://github.com/settings/tokens/new), 然后复制粘贴到文本框中。注意,至少要允许"public_repo","repo" (如果你需要访问私人仓库). ![Settings](docs/settings.jpg) ### 其它 * __热键__: GitCodeTree 使用 [keymaster](https://github.com/madrobby/keymaster) 注册热键。查看 [支持的按键](https://github.com/madrobby/keymaster#supported-keys). -* __记得栏可见性__: 如果勾选此项,基于其可见性显示或隐藏GitCodeTree. -* __在非代码页__: 如果勾选此项,让GitCodeTree等非代码页的问题和请求. -* __一次加载整个树__: (仅支持github) 如果勾选此项,进入项目页面时GitCodeTree将加载整个项目树。如果您经常访问非常大的项目,为了避免长时间加载,请勿勾选此项. +* __记得栏可见性__: 如果勾选此项,基于其可见性显示或隐藏GitCodeTree. +* __在非代码页__: 如果勾选此项,让GitCodeTree等非代码页的问题和请求. +* __一次加载整个树__: (仅支持github) 如果勾选此项,进入项目页面时GitCodeTree将加载整个项目树。如果您经常访问非常大的项目,为了避免长时间加载,请勿勾选此项. ## Credits * [@crashbell](https://github.com/crashbell) for helping with GitLab and others diff --git a/chrome_test_key.pem b/chrome_test_key.pem new file mode 100644 index 0000000..f9886de --- /dev/null +++ b/chrome_test_key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEA7pVSB0UiadYCxCjf8zngckEBVtOASXjxdJKVlTtbBxApg873 +0wujcqSZRQrs39m4rV/C0qoqWAnGpfYL7ACqrsZn/FSFfdiGFU9wxQnbPbNIm3zy +xVWuD2sHbp7UtAwIZknQxjkwHV3qoPTRGoXkQ6brLH/khi6B7Ps7y2xURyoCyDmb +f2XjhCSbVRGhsPSZpfekVz4WGiLDMZV0av6d1RuXoXJXjb1sKuDF1xwTUEc+Q8BL +eY3cfzuIvo5KoyB2F0x1mzJrg8KBcTbtXZSJ8PqQlIHeJfiv/NEYHSNy4qpnhp/5 +IbsvuOr3XpXPlcd4GUsYswsNrLWgTvedtyuhMwIDAQABAoIBAFT9WFVCqXmuRRn/ +vZd1fKD2yzVU7pQ9wzXVqfeZR1oCxecwaVQDB1ylifvwYmVzt7f7LvnAqIjoIp2o +QqL1sdfE0fIvYcZsxYb935wxYKpgHXNWVV06omDXrbQYXIku6CcYEIksghlUBWsF +CyA5phD7ezdE7/Fky9/Rt4FFu9gFTRi2KlrQc5oE7kXbSk84IUKKgnJaiEWTHpRm +n4EFeq7NhQrHuEs/EUV9M4jreP3WqrUE3UwVS0jmxLbVzNbahjv9WuU9vCq8pbHZ +pLZC0RmLBcyxL0KFZJbsU0ZjEg7i0Wlp4N4L415/dCUUm+hVo7ZxycnyZ8OgJXzk +dnY8hBECgYEA9zffVrDE82T09DMBLtgaiiPIUsu1nLe59OKvtg6khxTqyVac1Bd0 +KE1a7tHJ9V/AAv7AmJD9i287/R/xwHEd/4SfOX7wzHPiZAzTT4f2wHFcHM4j9jK+ +OA5S6uOoZJPrhdtUSdVdqrOQBgYExsSG242IDdP11mHsZA1l2Nc1U30CgYEA9w7s +mjIOBJmkiqh2QBJDIGNUnLygMlOzTbt24jjE5VZT5aU/OxnrhsrgVnXQxOhO0bKG +1XuxJ3qxFKYEvMLOA6vKybvig2bjdywIqagBURf40KI2vOcjJMm0Y0bJ+wJDRoFO +P2Kux7sLTe69zn4d+2V51ZqiXePosa9bNkANhm8CgYBo7l0spaEjEiHqmM+Su4Ug +RynbAr4WQ+F5MNKV+scY0ucJCGtOlpnmFVdYcNFBBiAw5UKIP1pu2Yrj2LA7F4g9 +EWSn+dppXXKlNtBmPHaenj8TtueKs2UL1ACb1H+AGUzppvuyzw6PyuGBvQI//+Ch +xgQOon4BPdUhbpJhJI9s3QKBgQCLAImcg/chHXTXUssdZ2j/KwPrH7GePzuNy6Cq +zTfytKyFc4Ds9rtuXmz0GFt6vh3CnAiCypI03TIOpQ3bSltw81IoSJ68QcJPRaYm +FlGPV8Z1VB8qD33Vb+sfRC/WG0LQw2XMAfDGjXVhxqZiLNEfpctzpAoge19rwXa3 +QjiZ3wKBgQCZ3qAbCWKf5GHoBfs+MpsfbAmzkenkbEGa/JZO3TJLkz34b+aB2irj +zblnQT3o3ljtXroF/Mgw4dF+fozAWi4NjDLAlX/tImwB/jBF02xukaa51tDbchqv +gtU/3j05xaH5H46zSD9sE7qR1PSudI3etvKxFQcAYT5c/qVeKe5S/Q== +-----END RSA PRIVATE KEY----- diff --git a/dist/chrome.crx b/dist/chrome.crx index 7946bc5..b4c2720 100644 Binary files a/dist/chrome.crx and b/dist/chrome.crx differ diff --git a/dist/chrome.zip b/dist/chrome.zip index 3f5ef8c..b2f2b3f 100644 Binary files a/dist/chrome.zip and b/dist/chrome.zip differ diff --git a/dist/firefox.xpi b/dist/firefox.xpi deleted file mode 100644 index 027f451..0000000 Binary files a/dist/firefox.xpi and /dev/null differ diff --git a/dist/firefox.zip b/dist/firefox.zip new file mode 100644 index 0000000..731dd20 Binary files /dev/null and b/dist/firefox.zip differ diff --git a/dist/opera.nex b/dist/opera.nex index 7946bc5..b4c2720 100644 Binary files a/dist/opera.nex and b/dist/opera.nex differ diff --git a/docs/chrome-github.jpg b/docs/chrome-github.jpg new file mode 100644 index 0000000..27f8eff Binary files /dev/null and b/docs/chrome-github.jpg differ diff --git a/docs/chrome-github.png b/docs/chrome-github.png deleted file mode 100644 index 52f4d2e..0000000 Binary files a/docs/chrome-github.png and /dev/null differ diff --git a/docs/opera-github.jpg b/docs/opera-github.jpg new file mode 100644 index 0000000..8a6efca Binary files /dev/null and b/docs/opera-github.jpg differ diff --git a/docs/opera-github.png b/docs/opera-github.png deleted file mode 100644 index 61c698f..0000000 Binary files a/docs/opera-github.png and /dev/null differ diff --git a/docs/settings.jpg b/docs/settings.jpg index a6a53b7..1e63c27 100644 Binary files a/docs/settings.jpg and b/docs/settings.jpg differ diff --git a/gulpfile.babel.js b/gulpfile.babel.js index cae03a1..d3fd0bc 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,209 +1,220 @@ import gulp from 'gulp' import fs from 'fs' +import os from 'os' import path from 'path' import { merge } from 'event-stream' import map from 'map-stream' import { spawn } from 'child_process' const $ = require('gulp-load-plugins')() -const version = require('./package.json').version // Tasks gulp.task('clean', () => { - return pipe('./tmp', $.clean()) + return pipe('./tmp', $.clean()) }) gulp.task('build', (cb) => { - $.runSequence('clean', 'styles', 'chrome', 'opera', 'safari', 'firefox', cb) + $.runSequence('clean', 'styles', 'chrome', 'opera', 'safari', 'firefox', cb) }) gulp.task('default', ['build'], () => { - gulp.watch(['./libs/**/*', './src/**/*'], ['default']) + gulp.watch(['./libs/**/*', './src/**/*', './package.json'], ['default']) }) gulp.task('dist', ['build'], (cb) => { - $.runSequence('firefox:xpi', 'chrome:zip', 'chrome:crx', 'opera:nex', cb) + $.runSequence('firefox:zip', 'chrome:zip', 'chrome:crx', 'opera:nex', cb) }) gulp.task('test', ['build'], (cb) => { - const ps = spawn( - './node_modules/.bin/mocha', - ['--harmony', '--reporter', 'spec', '--bail', '--recursive', '--timeout', '-1'] - ) - ps.stdout.pipe(process.stdout); - ps.stderr.pipe(process.stderr); - ps.on('close', cb) + const ps = spawn( + './node_modules/.bin/mocha', + ['--harmony', '--reporter', 'spec', '--bail', '--recursive', '--timeout', '-1'] + ) + ps.stdout.pipe(process.stdout); + ps.stderr.pipe(process.stderr); + ps.on('close', cb) }) gulp.task('styles', () => { - return pipe( - './src/styles/octotree.less', - $.plumber(), - $.less({ relativeUrls: true }), - $.autoprefixer({ cascade: true }), - './tmp' - ) + return pipe( + './src/styles/octotree.less', + $.plumber(), + $.less({ relativeUrls: true }), + $.autoprefixer({ cascade: true }), + './tmp' + ) }) gulp.task('lib:ondemand', (cb) => { - const dir = './libs/ondemand' - const code = fs.readdirSync(dir).map(file => { - return `window['${file}'] = function () { - ${fs.readFileSync(path.join(dir, file))} - };\n` - }).join('') + const dir = './libs/ondemand' + const code = fs.readdirSync(dir).map(file => { + return `window['${file}'] = function () { + ${fs.readFileSync(path.join(dir, file))} + };\n` + }).join('') - fs.writeFileSync('./tmp/ondemand.js', code) + fs.writeFileSync('./tmp/ondemand.js', code) - cb() + cb() }) // Chrome gulp.task('chrome:template', () => { - return buildTemplate({ CHROME: true }) + return buildTemplate({SUPPORT_FILE_ICONS: true, SUPPORT_GHE: true}) }) gulp.task('chrome:js', ['chrome:template', 'lib:ondemand'], () => { - return buildJs(['./src/config/chrome/overrides.js'], { CHROME: true }) + return buildJs(['./src/config/chrome/overrides.js'], {SUPPORT_FILE_ICONS: true, SUPPORT_GHE: true}) }) gulp.task('chrome', ['chrome:js'], () => { - return merge( - pipe('./icons/**/*', './tmp/chrome/icons'), - pipe('./fonts/**/*', './tmp/chrome/fonts'), - pipe(['./libs/**/*', '!./libs/ondemand{,/**}', './tmp/octotree.*', './tmp/ondemand.js'], './tmp/chrome/'), - pipe('./src/config/chrome/background.js', $.babel(), './tmp/chrome/'), - pipe('./src/config/chrome/manifest.json', $.replace('$VERSION', version), './tmp/chrome/') - ) + return merge( + pipe('./icons/**/*', './tmp/chrome/icons'), + pipe(['./libs/**/*', '!./libs/ondemand{,/**}', './tmp/octotree.*', './tmp/ondemand.js'], './tmp/chrome/'), + pipe('./libs/file-icons.css', $.replace('../fonts', 'chrome-extension://__MSG_@@extension_id__/fonts'), './tmp/chrome/'), + pipe('./src/config/chrome/background.js', $.babel(), './tmp/chrome/'), + pipe('./src/config/chrome/manifest.json', $.replace('$VERSION', getVersion()), './tmp/chrome/') + ) }) gulp.task('chrome:zip', () => { - return pipe('./tmp/chrome/**/*', $.zip('chrome.zip'), './dist') + return pipe('./tmp/chrome/**/*', $.zip('chrome.zip'), './dist') }) -gulp.task('chrome:_crx', (cb) => { - $.run('"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"' + - ' --pack-extension=' + path.join(__dirname, './tmp/chrome') + - ' --pack-extension-key=' + path.join(process.env.HOME, '.ssh/chrome.pem') - ).exec(cb) -}) +gulp.task('chrome:crx', () => { + // This will package the crx using a private key. + // For the convenience of people who want to build locally without having to + // manage their own Chrome key, this code will use the bundled test key if + // a real key is not found in ~/.ssh. + const real = path.join(os.homedir() + '.ssh/chrome.pem') + const test = './chrome_test_key.pem' + const privateKey = fs.existsSync(real) ? fs.readFileSync(real) : fs.readFileSync(test) -gulp.task('chrome:crx', ['chrome:_crx'], () => { - return pipe('./tmp/chrome.crx', './dist') + return pipe('./tmp/chrome', $.crxPack({ + privateKey: privateKey, + filename: 'chrome.crx' + }), './dist') }) // Opera gulp.task('opera', ['chrome'], () => { - return pipe('./tmp/chrome/**/*', './tmp/opera') + return pipe('./tmp/chrome/**/*', './tmp/opera') }) gulp.task('opera:nex', () => { - return pipe('./dist/chrome.crx', $.rename('opera.nex'), './dist') + return pipe('./dist/chrome.crx', $.rename('opera.nex'), './dist') }) // Firefox gulp.task('firefox:template', () => { - return buildTemplate({ FIREFOX: true }) + return buildTemplate({SUPPORT_FILE_ICONS: true}) }) gulp.task('firefox:js', ['firefox:template', 'lib:ondemand'], () => { - return buildJs([], { FIREFOX: true }) + return buildJs([], {SUPPORT_FILE_ICONS: true}) }) gulp.task('firefox', ['firefox:js'], () => { - return merge( - pipe('./icons/**/*', './tmp/firefox/data/icons'), - pipe(['./libs/**/*', '!./libs/ondemand{,/**}', './tmp/octotree.*', './tmp/ondemand.js'], './tmp/firefox/data'), - pipe('./src/config/firefox/firefox.js', $.babel(), './tmp/firefox/lib'), - pipe('./src/config/firefox/package.json', $.replace('$VERSION', version), './tmp/firefox') - ) + return merge( + pipe('./icons/**/*', './tmp/firefox/icons'), + pipe(['./libs/**/*', '!./libs/ondemand{,/**}', './tmp/octotree.*', './tmp/ondemand.js'], './tmp/firefox'), + pipe('./libs/file-icons.css', $.replace('../fonts', 'moz-extension://__MSG_@@extension_id__/fonts'), './tmp/firefox/'), + pipe('./src/config/firefox/background.js', $.babel(), './tmp/firefox/'), + pipe('./src/config/firefox/manifest.json', $.replace('$VERSION', getVersion()), './tmp/firefox') + ) }) -gulp.task('firefox:xpi', (cb) => { - $.run('cd ./tmp/firefox && ../../node_modules/.bin/jpm xpi && mkdir -p ../../dist && mv GitCodeTree.xpi ../../dist/firefox.xpi').exec(cb) +gulp.task('firefox:zip', () => { + return pipe('./tmp/firefox/**/*', $.zip('firefox.zip'), './dist') }) // Safari gulp.task('safari:template', () => { - return buildTemplate({ SAFARI: true }) + return buildTemplate({}) }) gulp.task('safari:js', ['safari:template', 'lib:ondemand'], () => { - return buildJs([], { SAFARI: true }) + return buildJs([], {}) }) gulp.task('safari', ['safari:js'], () => { - return merge( - pipe('./icons/icon64.png', $.rename('Icon-64.png'), './tmp/safari/octotree.safariextension'), - pipe( - ['./libs/**/*', '!./libs/ondemand{,/**}', './tmp/octotree.*', './tmp/ondemand.js'], - './tmp/safari/octotree.safariextension/' - ), - pipe('./src/config/safari/Info.plist', $.replace('$VERSION', version), './tmp/safari/octotree.safariextension') - ) + return merge( + pipe('./icons/icon64.png', $.rename('Icon-64.png'), './tmp/safari/octotree.safariextension'), + pipe( + ['./libs/**/*', '!./libs/ondemand{,/**}', './tmp/octotree.*', './tmp/ondemand.js'], + './tmp/safari/octotree.safariextension/' + ), + pipe('./src/config/safari/Info.plist', $.replace('$VERSION', getVersion()), './tmp/safari/octotree.safariextension') + ) }) // Helpers function pipe(src, ...transforms) { - return transforms.reduce((stream, transform) => { - const isDest = typeof transform === 'string' - return stream.pipe(isDest ? gulp.dest(transform) : transform) - }, gulp.src(src)) + return transforms.reduce((stream, transform) => { + const isDest = typeof transform === 'string' + return stream.pipe(isDest ? gulp.dest(transform) : transform) + }, gulp.src(src)) } function html2js(template) { - return map(escape) + return map(escape) - function escape(file, cb) { - const path = $.util.replaceExtension(file.path, '.js') - const content = file.contents.toString() - const escaped = content - .replace(/\\/g, "\\\\") - .replace(/'/g, "\\'") - .replace(/\r?\n/g, "\\n' +\n '") - const body = template.replace('$$', escaped) + function escape(file, cb) { + const path = $.util.replaceExtension(file.path, '.js') + const content = file.contents.toString() + const escaped = content + .replace(/\\/g, "\\\\") + .replace(/'/g, "\\'") + .replace(/\r?\n/g, "\\n' +\n '") + const body = template.replace('$$', escaped) - file.path = path - file.contents = new Buffer(body) - cb(null, file) - } + file.path = path + file.contents = new Buffer(body) + cb(null, file) + } } function buildJs(overrides, ctx) { - const src = [ - './tmp/template.js', - './src/constants.js', - './src/adapters/adapter.js', - './src/adapters/bitbucket.js', - './src/adapters/github.js', - './src/adapters/oschina.js', - './src/view.help.js', - './src/view.error.js', - './src/view.tree.js', - './src/view.options.js', - './src/util.location.js', - './src/util.module.js', - './src/util.async.js', - './src/util.storage.js' - ].concat(overrides) - .concat('./src/octotree.js') + const src = [ + './tmp/template.js', + './src/constants.js', + './src/adapters/adapter.js', + './src/adapters/pjax.js', + './src/adapters/bitbucket.js', + './src/adapters/github.js', + './src/adapters/oschina.js', + './src/view.help.js', + './src/view.error.js', + './src/view.tree.js', + './src/view.options.js', + './src/util.location.js', + './src/util.module.js', + './src/util.async.js', + './src/util.storage.js' + ].concat(overrides) + .concat('./src/octotree.js') - return pipe( - src, - $.babel(), - $.concat('octotree.js'), - $.preprocess({ context: ctx }), - './tmp' - ) + return pipe( + src, + $.babel(), + $.concat('octotree.js'), + $.preprocess({context: ctx}), + './tmp' + ) } function buildTemplate(ctx) { - const LOTS_OF_SPACES = new Array(500).join(' ') + const LOTS_OF_SPACES = new Array(500).join(' ') - return pipe( - './src/template.html', - $.preprocess({ context: ctx }), - $.replace('__SPACES__', LOTS_OF_SPACES), - html2js('const TEMPLATE = \'$$\''), - './tmp' - ) + return pipe( + './src/template.html', + $.preprocess({ context: ctx }), + $.replace('__SPACES__', LOTS_OF_SPACES), + html2js('const TEMPLATE = \'$$\''), + './tmp' + ) +} + +function getVersion() { + delete require.cache[require.resolve('./package.json')] + return require('./package.json').version } diff --git a/libs/file-icons.css b/libs/file-icons.css new file mode 100644 index 0000000..914ce07 --- /dev/null +++ b/libs/file-icons.css @@ -0,0 +1,642 @@ +/* + | File Icons + | @link https://github.com/file-icons + | @author Daniel Brooker https://github.com/DanBrooker + */ + +/* ----------------------------[ Colors ]---------------------------------- */ + +/*============================================================================* + PALETTE + Base16 colours from https://github.com/chriskempson/base16 +/*============================================================================*/ +.light-red:before { + color: #c97071; +} +.medium-red:before { + color: #ac4142; +} +.dark-red:before { + color: #742c2d; +} +.light-green:before { + color: #a6ba7b; +} +.medium-green:before { + color: #90a959; +} +.dark-green:before { + color: #66783e; +} +.light-yellow:before { + color: #fae0bc; +} +.medium-yellow:before { + color: #ee9e2e; +} +.dark-yellow:before { + color: #d88511; +} +.light-blue:before { + color: #6098b0; +} +.medium-blue:before { + color: #6a9fb5; +} +.dark-blue:before { + color: #46788d; +} +.light-maroon:before { + color: #be7953; +} +.medium-maroon:before { + color: #8f5536; +} +.dark-maroon:before { + color: #573421; +} +.light-purple:before { + color: #c7a4c0; +} +.medium-purple:before { + color: #aa759f; +} +.dark-purple:before { + color: #825078; +} +.light-orange:before { + color: #d99762; +} +.medium-orange:before { + color: #d28445; +} +.dark-orange:before { + color: #a35f27; +} +.light-cyan:before { + color: #6bb0a4; +} +.medium-cyan:before { + color: #75b5aa; +} +.dark-cyan:before { + color: #4d9085; +} +.light-pink:before { + color: #ff4ddb; +} +.medium-pink:before { + color: #ff00cc; +} +.dark-pink:before { + color: #b3008f; +} +.theme-colour-check { + background: #ffffff; +} + +/* ----------------------------[ Fonts ]---------------------------------- */ + +@font-face { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + src: url("../fonts/fontawesome.woff2"); +} + +@font-face { + font-family: Mfizz; + src: url("../fonts/mfixx.woff2"); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: Devicons; + src: url("../fonts/devopicons.woff2"); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: file-icons; + src: url("../fonts/file-icons.woff2"); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: octicons; + src: url("../fonts/octicons.woff2"); + font-weight: normal; + font-style: normal; +} + +/* ----------------------------[ Icons ]---------------------------------- */ + +.icon:before{ + font-weight: normal; + font-style: normal; + text-align: center; + width: 16px; + line-height: 1; + position: relative; + display: inline-block; + -webkit-font-smoothing: antialiased; +} + +/*============================================================================* + Octicons + https://github.com/github/octicons +/*============================================================================*/ + +.binary-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f094"; } +.book-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f007"; } +.brew-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f069"; font-size: 15px; left: 1px; } +.checklist-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f076"; font-size: 17px; left: 1px; } +.code-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f05f"; } +.database-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f096"; } +.gear-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f02f"; } +.git-commit-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f01f"; } +.git-merge-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f023"; } +.github-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f00a"; } +.graph-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f043"; } +.image-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f012"; } +.key-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f049"; } +.link-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f0b0"; } +.markdown-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f0c9"; } +.package-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f0c4"; } +.ruby-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f047"; } +.secret-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f08c"; } +.squirrel-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f0b2"; font-size: 15px; } +.text-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f011"; } +.zip-icon:before { font-family: octicons; font-size: 16px; top: 1px; content: "\f013"; } + + + + +/*============================================================================* + FontAwesome + http://fortawesome.github.io/Font-Awesome/cheatsheet +/*============================================================================*/ + +.android-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f17b"; font-size: 16px; top: 1px; } +.at-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f1fa"; font-size: 15px; top: 1px; } +.audio-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f028"; font-size: 15px; top: 1px; } +.bullhorn-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f0a1"; font-size: 16px; top: 2px; } +.calc-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f1ec"; font-size: 14px; } +.coffee-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f0f4"; font-size: 14px; top: 1px; } +.css3-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f13c"; top: 0; } +.circle-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f111"; font-size: 16px; top: 1px; } +.earth-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f0ac"; font-size: 15px; } +.gears-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f085"; font-size: 15px; } +.html5-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f13b"; font-size: 15px; top: 1px; } +.mobile-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f10b"; font-size: 20px; top: 2px; } +.moon-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f186"; font-size: 16px; top: 1px; } +.music-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f001"; font-size: 15px; } +.print-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f02f"; font-size: 15px; top: 2px; } +.recycle-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f1b8"; font-size: 15px; top: 2px; } +.rss-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f143"; font-size: 16px; top: 2px; } +.smarty-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f0eb"; font-size: 15px; } +.sourcemap-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f279"; font-size: 14px; } +.sun-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f185"; font-size: 14px; -webkit-font-smoothing: subpixel-antialiased; } +.toc-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f03a"; font-size: 15px; top: 2px; } +.twig-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f1bb"; font-size: 14px; } +.pdf-icon:before { font-family: FontAwesome; font-size: 13px; content: "\f1c1"; font-size: 14px; } + + + +/*============================================================================* + Mfizz + http://mfizz.com/oss/font-mfizz +/*============================================================================*/ + +.apache-icon:before { font-family: Mfizz; font-size: 14px; content: "\f102"; top: 3px; font-size: 15px; } +.archlinux-icon:before { font-family: Mfizz; font-size: 14px; content: "A"; top: 1px; font-size: 15px; } +.c-icon:before { font-family: Mfizz; font-size: 14px; content: "\f106"; top: 1px; font-size: 13px; } +.cpp-icon:before { font-family: Mfizz; font-size: 14px; content: "\f10b"; top: 1px; } +.csharp-icon:before { font-family: Mfizz; font-size: 14px; content: "\f10c"; top: 1px; } +.debian-icon:before { font-family: Mfizz; font-size: 14px; content: "\f111"; top: 1px; } +.elixir-icon:before { font-family: Mfizz; font-size: 14px; content: "\f113"; top: 1px; } +.gnome-icon:before { font-family: Mfizz; font-size: 14px; content: "\f119"; top: 1px; } +.haskell-icon:before { font-family: Mfizz; font-size: 14px; content: "\f121"; top: 2px; font-size: 16px; } +.java-icon:before { font-family: Mfizz; font-size: 14px; content: "\f126"; top: 2px; font-size: 16px; } +.js-icon:before { font-family: Mfizz; font-size: 14px; content: "\f129"; top: 1px; font-size: 14px; } +.msql-icon:before { font-family: Mfizz; font-size: 14px; content: "\f136"; top: 2px; font-size: 15px; text-shadow: 0 0 0; } +.objc-icon:before { font-family: Mfizz; font-size: 14px; content: "\f13e"; top: 2px; font-size: 16px; } +.osx-icon:before { font-family: Mfizz; font-size: 14px; content: "\f141"; top: 1px; } +.perl-icon:before { font-family: Mfizz; font-size: 14px; content: "\f142"; top: 1px; } +.python-icon:before { font-family: Mfizz; font-size: 14px; content: "\f14c"; top: 1px; } +.red-hat-icon:before { font-family: Mfizz; font-size: 14px; content: "\f14e"; top: 2px; } +.scala-icon:before { font-family: Mfizz; font-size: 14px; content: "\f154"; top: 1px; } +.sql-icon:before { font-family: Mfizz; font-size: 14px; content: "\f10e"; top: 1px; } +.svg-icon:before { font-family: Mfizz; font-size: 14px; content: "\f15c"; top: 1px; } +.tt-icon:before { font-family: Mfizz; font-size: 14px; content: "TT"; } +.x11-icon:before { font-family: Mfizz; font-size: 14px; content: "\f16e"; top: 1px; font-size: 13px; } + + + +/*============================================================================* + Devicons + http://vorillaz.github.io/devicons +/*============================================================================*/ + +.angular-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e653"; } +.appcelerator-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e6ab"; } +.appstore-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e613"; } +.asp-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e67f"; } +.atom-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e664"; -webkit-font-smoothing: subpixel-antialiased; } +.backbone-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e652"; } +.bootstrap-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e647"; font-size: 15px; top: 2px; } +.bower-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e64d"; text-shadow: 0 0 0; } +.chrome-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e643"; } +.clojure-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e668"; -webkit-font-smoothing: subpixel-antialiased; } +.compass-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e661"; font-size: 14px; top: 2px; } +.dart-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e698"; font-size: 15px; top: 2px; } +.dlang-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e6af"; } +.dojo-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e61c"; font-size: 16px; top: 4px; transform: scale(1.2); -webkit-font-smoothing: subpixel-antialiased; } +.dropbox-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e607"; } +.eclipse-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e69e"; } +.erlang-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e6b1"; } +.extjs-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e68e"; } +.fsharp-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e6a7"; left: 1px; top: 2px; } +.git-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e602"; font-size: 15px; top: 2px; } +.heroku-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e67b"; } +.jquery-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e650"; font-size: 15px; top: 2px; } +.jqueryui-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e654"; font-size: 15px; top: 2px; } +.laravel-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e63f"; -webkit-font-smoothing: subpixel-antialiased; } +.materialize-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e6b6"; transform: scale(1.2); -webkit-font-smoothing: subpixel-antialiased; } +.modernizr-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e620"; } +.mootools-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e68f"; text-shadow: 0 0 0; } +.node-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e618"; } +.pod-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e669"; font-size: 15px; top: 2px; } +.prolog-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e6a1"; } +.rails-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e63b"; } +.raphael-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e65f"; font-size: 15px; } +.requirejs-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e670"; } +.rust-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e6a8"; } +.sass-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e64b"; } +.sencha-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e68c"; } +.snapsvg-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e65e"; } +.swift-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e655"; left: -1px; } +.travis-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e67e"; font-size: 15px; top: 2px; } +.uikit-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e673"; font-size: 15px; top: 2px; } +.unity3d-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e621"; } +.vim-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e6c5"; } +.vs-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e60c"; font-size: 14px; top: 2px; } +.windows-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e60f"; font-size: 14px; top: 2px; } +.yeoman-icon:before { font-family: Devicons; font-size: 16px; top: 3px; content: "\e67a"; } + + + + +/*============================================================================* + Custom file icons + See https://github.com/file-icons/source/#adding-new-icons +/*============================================================================*/ + +._1c-icon:before { font-family: file-icons; font-size: 15px; content: "\a5ea"; top: 3px; font-size: 16px; } +._1c-alt-icon:before { font-family: file-icons; font-size: 15px; content: "\ea28"; top: 3px; font-size: 16px; } +.abap-icon:before { font-family: file-icons; font-size: 15px; content: "\e92b"; top: 2px; } +.access-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ea"; top: 2px; } +.ada-icon:before { font-family: file-icons; font-size: 15px; content: "\e90b"; top: 3px; font-size: 17px; } +.ae-icon:before { font-family: file-icons; font-size: 15px; content: "\e9f3"; top: 2px; } +.ahk-icon:before { font-family: file-icons; font-size: 15px; content: "\e932"; top: 2px; } +.ai-icon:before { font-family: file-icons; font-size: 15px; content: "\e6b4"; top: 2px; } +.alloy-icon:before { font-family: file-icons; font-size: 15px; content: "\e935"; top: 2px; } +.alpine-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ff"; top: 2px; font-size: 16px; } +.ampl-icon:before { font-family: file-icons; font-size: 15px; content: "\e94e"; top: 3px; font-size: 16px; left: 1px; } +.amx-icon:before { font-family: file-icons; font-size: 15px; content: "\e99b"; top: 3px; font-size: 16px; } +.ant-icon:before { font-family: file-icons; font-size: 15px; content: "\e93e"; top: 4px; font-size: 18px; transform: scale(1.1); } +.antlr-icon:before { font-family: file-icons; font-size: 15px; content: "\e92c"; top: 3px; } +.api-icon:before { font-family: file-icons; font-size: 15px; content: "\e92d"; top: 2px; } +.apl-icon:before { font-family: file-icons; font-size: 15px; content: "\234b"; top: 2px; } +.apple-icon:before { font-family: file-icons; font-size: 15px; content: "\e925"; top: 1px; } +.appveyor-icon:before { font-family: file-icons; font-size: 15px; content: "\e923"; top: 2px; } +.arc-icon:before { font-family: file-icons; font-size: 15px; content: "\e92f"; top: 2px; } +.arduino-icon:before { font-family: file-icons; font-size: 15px; content: "\e930"; top: 3px; font-size: 16px; } +.arttext-icon:before { font-family: file-icons; font-size: 15px; content: "\24d0"; top: 2px; } +.as-icon:before { font-family: file-icons; font-size: 15px; content: "\e92e"; top: 1px; font-size: 14px; } +.asciidoc-icon:before { font-family: file-icons; font-size: 15px; content: "\e918"; top: 1px; font-size: 14px; } +.ats-icon:before { font-family: file-icons; font-size: 15px; content: "\e934"; top: 2px; } +.audacity-icon:before { font-family: file-icons; font-size: 15px; content: "\e9f9"; top: 2px; } +.augeas-icon:before { font-family: file-icons; font-size: 15px; content: "\e931"; top: 2px; } +.autoit-icon:before { font-family: file-icons; font-size: 15px; content: "\e933"; top: 2px; font-size: 16px; } +.babel-icon:before { font-family: file-icons; font-size: 15px; content: "\e91f"; top: 2px; left: 1px; } +.bibtex-icon:before { font-family: file-icons; font-size: 15px; content: "\e601"; top: 2px; font-size: 16px; -webkit-font-smoothing: subpixel-antialiased; } +.blender-icon:before { font-family: file-icons; font-size: 15px; content: "\e9fa"; top: 2px; } +.bluespec-icon:before { font-family: file-icons; font-size: 15px; content: "\e93c"; top: 1px; font-size: 13px; left: 1px; } +.boo-icon:before { font-family: file-icons; font-size: 15px; content: "\e939"; top: 2px; } +.boot-icon:before { font-family: file-icons; font-size: 15px; content: "\f103"; top: 2px; font-size: 16px; } +.brain-icon:before { font-family: file-icons; font-size: 15px; content: "\e93a"; top: 2px; } +.brakeman-icon:before { font-family: file-icons; font-size: 15px; content: "\e9d6"; top: 2px; } +.bro-icon:before { font-family: file-icons; font-size: 15px; content: "\e93b"; top: 3px; font-size: 16px; } +.broccoli-icon:before { font-family: file-icons; font-size: 15px; content: "\e922"; top: 1px; font-size: 14px; } +.byond-icon:before { font-family: file-icons; font-size: 15px; content: "\e962"; top: 2px; } +.cabal-icon:before { font-family: file-icons; font-size: 15px; content: "\e9c2"; top: 2px; } +.cake-icon:before { font-family: file-icons; font-size: 15px; content: "\e9e3"; top: 2px; } +.cakefile-icon:before { font-family: file-icons; font-size: 15px; content: "\e924"; top: 2px; } +.cakephp-icon:before { font-family: file-icons; font-size: 15px; content: "\e9d3"; top: 1px; font-size: 14px; } +.cc-icon:before { font-family: file-icons; font-size: 15px; content: "\e9d5"; top: 2px; font-size: 16px; } +.ceylon-icon:before { font-family: file-icons; font-size: 15px; content: "\e94f"; top: 2px; } +.cf-icon:before { font-family: file-icons; font-size: 15px; content: "\e929"; top: 2px; } +.chai-icon:before { font-family: file-icons; font-size: 15px; content: "c"; top: 3px; font-size: 16px; } +.chapel-icon:before { font-family: file-icons; font-size: 15px; content: "\e950"; top: 2px; } +.chartjs-icon:before { font-family: file-icons; font-size: 15px; content: "\ea0b"; top: 2px; } +.chuck-icon:before { font-family: file-icons; font-size: 15px; content: "\e943"; top: 2px; } +.circleci-icon:before { font-family: file-icons; font-size: 15px; content: "\ea12"; top: 2px; font-size: 14px; } +.cirru-icon:before { font-family: file-icons; font-size: 15px; content: "\e951"; top: 2px; text-shadow: 0 0 0; } +.cl-icon:before { font-family: file-icons; font-size: 15px; content: "\e972"; top: 2px; text-shadow: 0 0 0; } +.clarion-icon:before { font-family: file-icons; font-size: 15px; content: "\e952"; top: 1px; font-size: 14px; left: 1px; } +.clean-icon:before { font-family: file-icons; font-size: 15px; content: "\e95b"; top: 2px; font-size: 16px; } +.click-icon:before { font-family: file-icons; font-size: 15px; content: "\e95c"; top: 2px; } +.clips-icon:before { font-family: file-icons; font-size: 15px; content: "\e940"; top: 3px; font-size: 18px; } +.cljs-icon:before { font-family: file-icons; font-size: 15px; content: "\f104"; top: 2px; } +.cmake-icon:before { font-family: file-icons; font-size: 15px; content: "\e93f"; top: 1px; font-size: 14px; } +.codecov-icon:before { font-family: file-icons; font-size: 15px; content: "\2602"; top: 2px; } +.composer-icon:before { font-family: file-icons; font-size: 15px; content: "\e683"; top: 3px; font-size: 17px; } +.config-icon:before { font-family: file-icons; font-size: 15px; content: "\f07c"; top: 2px; font-size: 14px; } +.cordova-icon:before { font-family: file-icons; font-size: 15px; content: "\ea11"; top: 2px; } +.coq-icon:before { font-family: file-icons; font-size: 15px; content: "\e95f"; top: 2px; font-size: 16px; left: 1px; } +.cp-icon:before { font-family: file-icons; font-size: 15px; content: "\e942"; top: 3px; font-size: 17px; } +.creole-icon:before { font-family: file-icons; font-size: 15px; content: "\e95e"; top: 2px; } +.crystal-icon:before { font-family: file-icons; font-size: 15px; content: "\e902"; top: 2px; left: 1px; } +.csound-icon:before { font-family: file-icons; font-size: 15px; content: "\e9f0"; top: 2px; } +.csscript-icon:before { font-family: file-icons; font-size: 15px; content: "\e9e2"; top: 2px; } +.cucumber-icon:before { font-family: file-icons; font-size: 15px; content: "\f02b"; top: 3px; } +.cython-icon:before { font-family: file-icons; font-size: 15px; content: "\e963"; top: 2px; } +.d3-icon:before { font-family: file-icons; font-size: 15px; content: "\ea10"; top: 2px; } +.darcs-icon:before { font-family: file-icons; font-size: 15px; content: "\e964"; top: 2px; } +.dashboard-icon:before { font-family: file-icons; font-size: 15px; content: "\f07d"; top: 2px; font-size: 13px; } +.dbase-icon:before { font-family: file-icons; font-size: 15px; content: "\e9f1"; top: 2px; } +.default-icon:before { font-family: file-icons; font-size: 15px; content: "\1f5cc";top: 2px; font-size: 14px; } +.diff-icon:before { font-family: file-icons; font-size: 15px; content: "\e960"; top: 2px; } +.docker-icon:before { font-family: file-icons; font-size: 15px; content: "\f106"; top: 3px; font-size: 18px; } +.doxygen-icon:before { font-family: file-icons; font-size: 15px; content: "\e928"; top: 1px; font-size: 13px; } +.doge-icon:before { font-family: file-icons; font-size: 15px; content: "\e946"; top: 2px; } +.dyalog-icon:before { font-family: file-icons; font-size: 15px; content: "\e90c"; top: 1px; font-size: 14px; left: 1px; } +.dylib-icon:before { font-family: file-icons; font-size: 15px; content: "\ea15"; top: 2px; } +.e-icon:before { font-family: file-icons; font-size: 15px; content: "E"; top: 1px; font-size: 14px; } +.eagle-icon:before { font-family: file-icons; font-size: 15px; content: "\e965"; top: 2px; } +.ec-icon:before { font-family: file-icons; font-size: 15px; content: "\e9c9"; top: 2px; } +.ecere-icon:before { font-family: file-icons; font-size: 15px; content: "\e966"; top: 3px; font-size: 16px; } +.editorconfig-icon:before { font-family: file-icons; font-size: 15px; content: "\ea1b"; top: 3px; } +.eiffel-icon:before { font-family: file-icons; font-size: 15px; content: "\e967"; top: 2px; font-size: 16px; } +.electron-icon:before { font-family: file-icons; font-size: 15px; content: "\ea27"; top: 3px; font-size: 16px; text-shadow: 0 0 0; } +.elm-icon:before { font-family: file-icons; font-size: 15px; content: "\f102"; top: 2px; } +.em-icon:before { font-family: file-icons; font-size: 15px; content: "\e968"; top: 3px; font-size: 16px; } +.ember-icon:before { font-family: file-icons; font-size: 15px; content: "\e61b"; top: 2px; font-size: 14px; } +.emacs-icon:before { font-family: file-icons; font-size: 15px; content: "\e926"; top: 2px; } +.eq-icon:before { font-family: file-icons; font-size: 15px; content: "\ea0a"; top: 5px; } +.eslint-icon:before { font-family: file-icons; font-size: 15px; content: "\ea0f"; top: 3px; font-size: 16px; } +.excel-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ee"; top: 2px; } +.fabfile-icon:before { font-family: file-icons; font-size: 15px; content: "\e94b"; top: 2px; font-size: 16px; } +.factor-icon:before { font-family: file-icons; font-size: 15px; content: "\e96a"; top: 3px; font-size: 18px; left: -2px; transform: scale(1.2); } +.fancy-icon:before { font-family: file-icons; font-size: 15px; content: "\e96b"; top: 2px; font-size: 16px; } +.fantom-icon:before { font-family: file-icons; font-size: 15px; content: "\e96f"; top: 2px; left: 1px; } +.fbx-icon:before { font-family: file-icons; font-size: 15px; content: "\e9fc"; top: 2px; } +.ff-icon:before { font-family: file-icons; font-size: 15px; content: "\fb00"; top: 3px; } +.finder-icon:before { font-family: file-icons; font-size: 15px; content: "\e9e9"; top: 3px; font-size: 16px; } +.flow-icon:before { font-family: file-icons; font-size: 15px; content: "\e921"; top: 1px; } +.flux-icon:before { font-family: file-icons; font-size: 15px; content: "\e969"; top: 2px; } +.font-icon:before { font-family: file-icons; font-size: 15px; content: "\e90f"; top: 1px; font-size: 14px; left: 1px; } +.fortran-icon:before { font-family: file-icons; font-size: 15px; content: "\e90a"; top: 1px; font-size: 14px; left: 1px; } +.freemarker-icon:before { font-family: file-icons; font-size: 15px; content: "\e970"; top: 2px; font-size: 16px; left: 1px; } +.frege-icon:before { font-family: file-icons; font-size: 15px; content: "\e96e"; top: 2px; font-size: 16px; left: 1px; } +.fuelux-icon:before { font-family: file-icons; font-size: 15px; content: "\ea09"; top: 3px; font-size: 16px; left: 2px; transform: scale(1.15); text-shadow: 0 0 0; } +.gams-icon:before { font-family: file-icons; font-size: 15px; content: "\e973"; top: 2px; left: 1px; } +.gap-icon:before { font-family: file-icons; font-size: 15px; content: "\e971"; top: 3px; font-size: 16px; left: 1px; } +.gdb-icon:before { font-family: file-icons; font-size: 15px; content: "\ea08"; top: 3px; font-size: 16px; transform: scale(1.15); text-shadow: 0 0 0; } +.genshi-icon:before { font-family: file-icons; font-size: 15px; content: "\e976"; top: 3px; } +.gentoo-icon:before { font-family: file-icons; font-size: 15px; content: "\e96d"; top: 1px; font-size: 14px; left: 1px; } +.gf-icon:before { font-family: file-icons; font-size: 15px; content: "\e978"; top: 2px; } +.glade-icon:before { font-family: file-icons; font-size: 15px; content: "\e938"; top: 2px; } +.glyphs-icon:before { font-family: file-icons; font-size: 15px; content: "G"; top: 3px; } +.gml-icon:before { font-family: file-icons; font-size: 15px; content: "\e975"; top: 3px; font-size: 16px; } +.gn-icon:before { font-family: file-icons; font-size: 15px; content: "\ea25"; top: 2px; } +.gnu-icon:before { font-family: file-icons; font-size: 15px; content: "\e679"; top: 2px; font-size: 16px; text-shadow: 0 0 0; } +.go-icon:before { font-family: file-icons; font-size: 15px; content: "\e624"; top: 3px; } +.godot-icon:before { font-family: file-icons; font-size: 15px; content: "\e974"; top: 2px; } +.golo-icon:before { font-family: file-icons; font-size: 15px; content: "\e979"; top: 2px; } +.gosu-icon:before { font-family: file-icons; font-size: 15px; content: "\e97a"; top: 2px; } +.gradle-icon:before { font-family: file-icons; font-size: 15px; content: "\e903"; top: 3px; font-size: 16px; left: 1px; } +.graphql-icon:before { font-family: file-icons; font-size: 15px; content: "\e97c"; top: 2px; } +.graphviz-icon:before { font-family: file-icons; font-size: 15px; content: "\e97d"; top: 4px; font-size: 17px; left: 1px; } +.groovy-icon:before { font-family: file-icons; font-size: 15px; content: "\e904"; top: 4px; font-size: 17px; left: -1px; } +.grunt-icon:before { font-family: file-icons; font-size: 15px; content: "\e611"; top: 1px; font-size: 14px; } +.gulp-icon:before { font-family: file-icons; font-size: 15px; content: "\e610"; top: 2px; font-size: 16px; } +.hack-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ce"; top: 2px; } +.haml-icon:before { font-family: file-icons; font-size: 15px; content: "\f15b"; top: 2px; } +.harbour-icon:before { font-family: file-icons; font-size: 15px; content: "\e97b"; top: 2px; font-size: 16px; text-shadow: 0 0 0; } +.hashicorp-icon:before { font-family: file-icons; font-size: 15px; content: "\e97e"; top: 2px; } +.haxe-icon:before { font-family: file-icons; font-size: 15px; content: "\e907"; top: 2px; } +.hy-icon:before { font-family: file-icons; font-size: 15px; content: "\e97f"; top: 2px; } +.idl-icon:before { font-family: file-icons; font-size: 15px; content: "\e947"; top: 3px; font-size: 18px; } +.idris-icon:before { font-family: file-icons; font-size: 15px; content: "\e983"; top: 2px; font-size: 16px; -webkit-font-smoothing: subpixel-antialiased; } +.igorpro-icon:before { font-family: file-icons; font-size: 15px; content: "\e980"; top: 2px; font-size: 16px; -webkit-font-smoothing: subpixel-antialiased; } +.indesign-icon:before { font-family: file-icons; font-size: 15px; content: "\e9f4"; top: 2px; } +.inform7-icon:before { font-family: file-icons; font-size: 15px; content: "\e984"; top: 2px; font-size: 16px; text-shadow: 0 0 0; } +.inno-icon:before { font-family: file-icons; font-size: 15px; content: "\e985"; top: 2px; } +.io-icon:before { font-family: file-icons; font-size: 15px; content: "\e981"; top: 1px; font-size: 13px; -webkit-font-smoothing: subpixel-antialiased; } +.ioke-icon:before { font-family: file-icons; font-size: 15px; content: "\e982"; top: 2px; } +.ionic-icon:before { font-family: file-icons; font-size: 15px; content: "\f14b"; top: 2px; } +.isabelle-icon:before { font-family: file-icons; font-size: 15px; content: "\e945"; top: 2px; font-size: 16px; } +.j-icon:before { font-family: file-icons; font-size: 15px; content: "\e937"; top: 1px; font-size: 13px; } +.jade-icon:before { font-family: file-icons; font-size: 15px; content: "\e90d"; top: 1px; font-size: 14px; } +.jake-icon:before { font-family: file-icons; font-size: 15px; content: "\e948"; top: 3px; font-size: 16px; } +.jenkins-icon:before { font-family: file-icons; font-size: 15px; content: "\e667"; top: 3px; font-size: 18px; text-shadow: 0 0 0; } +.jinja-icon:before { font-family: file-icons; font-size: 15px; content: "\e944"; top: 2px; } +.jsonld-icon:before { font-family: file-icons; font-size: 15px; content: "\e958"; top: 3px; font-size: 17px; } +.jsx-icon:before { font-family: file-icons; font-size: 15px; content: "\e9e6"; top: 1px; font-size: 14px; } +.julia-icon:before { font-family: file-icons; font-size: 15px; content: "\26ec"; top: 1px; font-size: 14px; } +.jupyter-icon:before { font-family: file-icons; font-size: 15px; content: "\e987"; top: 3px; font-size: 16px; } +.karma-icon:before { font-family: file-icons; font-size: 15px; content: "\e9cd"; top: 2px; } +.keynote-icon:before { font-family: file-icons; font-size: 15px; content: "\e9e5"; top: 2px; } +.khronos-icon:before { font-family: file-icons; font-size: 15px; content: "\e9f8"; top: 2px; } +.kivy-icon:before { font-family: file-icons; font-size: 15px; content: "\e901"; top: 2px; } +.knockout-icon:before { font-family: file-icons; font-size: 15px; content: "\4B"; top: 2px; } +.kotlin-icon:before { font-family: file-icons; font-size: 15px; content: "\e989"; top: 1px; font-size: 14px; } +.krl-icon:before { font-family: file-icons; font-size: 15px; content: "\e988"; top: 1px; font-size: 14px; } +.labview-icon:before { font-family: file-icons; font-size: 15px; content: "\e98a"; top: 2px; font-size: 16px; } +.lasso-icon:before { font-family: file-icons; font-size: 15px; content: "\e98c"; top: 2px; left: 1px; } +.leaflet-icon:before { font-family: file-icons; font-size: 15px; content: "\ea07"; top: 2px; } +.lean-icon:before { font-family: file-icons; font-size: 15px; content: "L"; top: 1px; font-size: 13px; } +.lein-icon:before { font-family: file-icons; font-size: 15px; content: "\f105"; top: 3px; font-size: 16px; text-shadow: 0 0 0; transform: scale(1.15); } +.lfe-icon:before { font-family: file-icons; font-size: 15px; content: "\e94c"; top: 2px; font-size: 16px; } +.lightwave-icon:before { font-family: file-icons; font-size: 15px; content: "\e9fb"; top: 2px; } +.lisp-icon:before { font-family: file-icons; font-size: 15px; content: "\e908"; top: 3px; font-size: 17px; } +.llvm-icon:before { font-family: file-icons; font-size: 15px; content: "\e91d"; top: 3px; font-size: 17px; } +.logtalk-icon:before { font-family: file-icons; font-size: 15px; content: "\e98d"; top: 2px; text-shadow: 0 0 0; } +.lookml-icon:before { font-family: file-icons; font-size: 15px; content: "\e98e"; top: 2px; font-size: 16px; text-shadow: 0 0 0; } +.ls-icon:before { font-family: file-icons; font-size: 15px; content: "\e914"; top: 2px; font-size: 14px; } +.lsl-icon:before { font-family: file-icons; font-size: 15px; content: "\e98b"; top: 1px; } +.lua-icon:before { font-family: file-icons; font-size: 15px; content: "\e91b"; top: 2px; font-size: 14px; } +.mako-icon:before { font-family: file-icons; font-size: 15px; content: "\e98f"; top: 4px; font-size: 16px; } +.mapbox-icon:before { font-family: file-icons; font-size: 15px; content: "\e941"; top: 1px; font-size: 13px; } +.marko-icon:before { font-family: file-icons; font-size: 15px; content: "\e920"; top: 4px; font-size: 18px; left: -1px; transform: scale(1.05); } +.mathematica-icon:before { font-family: file-icons; font-size: 15px; content: "\e990"; top: 2px; font-size: 16px; } +.mathjax-icon:before { font-family: file-icons; font-size: 15px; content: "\ea06"; top: 2px; } +.matlab-icon:before { font-family: file-icons; font-size: 15px; content: "\e991"; top: 2px; } +.max-icon:before { font-family: file-icons; font-size: 15px; content: "\e993"; top: 2px; } +.maxscript-icon:before { font-family: file-icons; font-size: 15px; content: "\e900"; top: 2px; } +.maya-icon:before { font-family: file-icons; font-size: 15px; content: "\e9f6"; top: 2px; font-size: 16px; } +.manpage-icon:before { font-family: file-icons; font-size: 15px; content: "\e936"; top: 3px; } +.mediawiki-icon:before { font-family: file-icons; font-size: 15px; content: "\e954"; top: 2px; font-size: 16px; } +.mercury-icon:before { font-family: file-icons; font-size: 15px; content: "\e994"; top: 3px; font-size: 16px; transform: scale(1.2); } +.metal-icon:before { font-family: file-icons; font-size: 15px; content: "M"; top: 1px; left: 1px; } +.meteor-icon:before { font-family: file-icons; font-size: 15px; content: "\e6a5"; top: 1px; } +.minecraft-icon:before { font-family: file-icons; font-size: 15px; content: "\e9dc"; top: 2px; } +.mirah-icon:before { font-family: file-icons; font-size: 15px; content: "\e995"; top: 2px; } +.mocha-icon:before { font-family: file-icons; font-size: 15px; content: "\26fe"; top: 2px; font-size: 17px; } +.model-icon:before { font-family: file-icons; font-size: 15px; content: "\e9e8"; top: 2px; font-size: 16px; } +.modula2-icon:before { font-family: file-icons; font-size: 15px; content: "\e996"; top: 2px; } +.monkey-icon:before { font-family: file-icons; font-size: 15px; content: "\e997"; top: 3px; font-size: 18px; left: -1px; } +.mruby-icon:before { font-family: file-icons; font-size: 15px; content: "\ea18"; top: 2px; } +.mupad-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ca"; top: 3px; font-size: 16px; } +.mustache-icon:before { font-family: file-icons; font-size: 15px; content: "\e60f"; top: 2px; font-size: 16px; } +.nant-icon:before { font-family: file-icons; font-size: 15px; content: "\e9e1"; top: 3px; transform: scale(1.2); } +.neko-icon:before { font-family: file-icons; font-size: 15px; content: "\ea05"; top: 2px; } +.netlogo-icon:before { font-family: file-icons; font-size: 15px; content: "\e99c"; top: 2px; left: 1px; } +.newrelic-icon:before { font-family: file-icons; font-size: 15px; content: "\e9d7"; top: 2px; } +.nginx-icon:before { font-family: file-icons; font-size: 15px; content:"\f146b"; top: 2px; } +.nib-icon:before { font-family: file-icons; font-size: 15px; content: "\2712"; top: 2px; } +.nimrod-icon:before { font-family: file-icons; font-size: 15px; content: "\e998"; top: 2px; } +.nit-icon:before { font-family: file-icons; font-size: 15px; content: "\e999"; top: 2px; } +.nix-icon:before { font-family: file-icons; font-size: 15px; content: "\e99a"; top: 3px; font-size: 16px; } +.nmap-icon:before { font-family: file-icons; font-size: 15px; content: "\e94d"; top: 3px; font-size: 16px; transform: scale(1.1); } +.nodemon-icon:before { font-family: file-icons; font-size: 15px; content: "\ea26"; top: 2px; } +.normalize-icon:before { font-family: file-icons; font-size: 15px; content: "\ea04"; top: 3px; font-size: 16px; } +.npm-icon:before { font-family: file-icons; font-size: 15px; content: "\e91c"; top: 3px; font-size: 17px; } +.nsis-icon:before { font-family: file-icons; font-size: 15px; content: "\ea1e"; top: 3px; font-size: 16px; } +.numpy-icon:before { font-family: file-icons; font-size: 15px; content: "\e99d"; top: 2px; font-size: 14px; } +.nuget-icon:before { font-family: file-icons; font-size: 15px; content: "\e9d9"; top: 2px; } +.nunjucks-icon:before { font-family: file-icons; font-size: 15px; content: "\e953"; top: 2px; font-size: 16px; } +.nvidia-icon:before { font-family: file-icons; font-size: 15px; content: "\e95d"; top: 2px; } +.objj-icon:before { font-family: file-icons; font-size: 15px; content: "\e99e"; top: 2px; } +.ocaml-icon:before { font-family: file-icons; font-size: 15px; content: "\e91a"; top: 1px; font-size: 14px; } +.onenote-icon:before { font-family: file-icons; font-size: 15px; content: "\e9eb"; top: 2px; } +.ooc-icon:before { font-family: file-icons; font-size: 15px; content: "\e9cb"; top: 2px; } +.opa-icon:before { font-family: file-icons; font-size: 15px; content: "\2601"; top: 2px; } +.opencl-icon:before { font-family: file-icons; font-size: 15px; content: "\e99f"; top: 2px; font-size: 16px; } +.openoffice-icon:before { font-family: file-icons; font-size: 15px; content: "\e9e4"; top: 2px; } +.org-icon:before { font-family: file-icons; font-size: 15px; content: "\e917"; top: 1px; font-size: 14px; left: 1px; } +.owl-icon:before { font-family: file-icons; font-size: 15px; content: "\e957"; top: 2px; } +.ox-icon:before { font-family: file-icons; font-size: 15px; content: "\e9a1"; top: 3px; font-size: 16px; text-shadow: 0 0 0; } +.oxygene-icon:before { font-family: file-icons; font-size: 15px; content: "\e9bf"; top: 2px; } +.oz-icon:before { font-family: file-icons; font-size: 15px; content: "\e9be"; top: 2px; } +.pan-icon:before { font-family: file-icons; font-size: 15px; content: "\e9bd"; top: 2px; } +.papyrus-icon:before { font-family: file-icons; font-size: 15px; content: "\e9bc"; top: 2px; } +.parrot-icon:before { font-family: file-icons; font-size: 15px; content: "\e9bb"; top: 3px; font-size: 16px; } +.pascal-icon:before { font-family: file-icons; font-size: 15px; content: "\e92a"; top: 2px; } +.patch-icon:before { font-family: file-icons; font-size: 15px; content: "\e961"; top: 2px; } +.pawn-icon:before { font-family: file-icons; font-size: 15px; content: "\265f"; top: 1px; font-size: 14px; } +.perl6-icon:before { font-family: file-icons; font-size: 15px; content: "\e96c"; top: 2px; } +.phalcon-icon:before { font-family: file-icons; font-size: 15px; content: "\e94a"; top: 2px; } +.php-icon:before { font-family: file-icons; font-size: 15px; content: "\f147"; top: 1px; font-size: 14px; left: 1px; } +.pickle-icon:before { font-family: file-icons; font-size: 15px; content: "\e9c4"; top: 2px; } +.pike-icon:before { font-family: file-icons; font-size: 15px; content: "\e9b9"; top: 4px; font-size: 16px; -webkit-font-smoothing: subpixel-antialiased; transform: scale(1.15); } +.pogo-icon:before { font-family: file-icons; font-size: 15px; content: "\e9b8"; top: 3px; font-size: 14px; -webkit-font-smoothing: subpixel-antialiased; } +.pony-icon:before { font-family: file-icons; font-size: 15px; content: "\e9b7"; top: 3px; font-size: 16px; } +.pointwise-icon:before { font-family: file-icons; font-size: 15px; content: "\e977"; top: 2px; } +.postcss-icon:before { font-family: file-icons; font-size: 15px; content: "\e910"; top: 2px; font-size: 14px; } +.postscript-icon:before { font-family: file-icons; font-size: 15px; content: "\e955"; top: 2px; left: 1px; } +.povray-icon:before { font-family: file-icons; font-size: 15px; content: "P"; top: 2px; left: 1px; } +.powerbuilder-icon:before { font-family: file-icons; font-size: 15px; content: "\ea14"; } +.powerpoint-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ec"; top: 2px; } +.powershell-icon:before { font-family: file-icons; font-size: 15px; content: "\e9da"; top: 2px; font-size: 16px; } +.premiere-icon:before { font-family: file-icons; font-size: 15px; content: "\e9f5"; top: 2px; } +.processing-icon:before { font-family: file-icons; font-size: 15px; content: "\e9a0"; top: 2px; } +.progress-icon:before { font-family: file-icons; font-size: 15px; content: "\e9c0"; top: 2px; font-size: 16px; transform: scale(1.2); } +.propeller-icon:before { font-family: file-icons; font-size: 15px; content: "\e9b5"; top: 3px; font-size: 16px; } +.protractor-icon:before { font-family: file-icons; font-size: 15px; content: "\e9de"; top: 3px; } +.psd-icon:before { font-family: file-icons; font-size: 15px; content: "\e6b8"; top: 2px; } +.pug-icon:before { font-family: file-icons; font-size: 15px; content: "\ea13"; top: 3px; font-size: 16px; } +.pug-alt-icon:before { font-family: file-icons; font-size: 15px; content: "\e9d0"; top: 3px; font-size: 16px; } +.puppet-icon:before { font-family: file-icons; font-size: 15px; content: "\f0c3"; top: 2px; left: 1px; } +.purebasic-icon:before { font-family: file-icons; font-size: 15px; content: "\01b5"; top: 2px; } +.purescript-icon:before { font-family: file-icons; font-size: 15px; content: "\e9b2"; top: 3px; } +.r-icon:before { font-family: file-icons; font-size: 15px; content: "\e905"; top: 3px; font-size: 17px; } +.racket-icon:before { font-family: file-icons; font-size: 15px; content: "\e9b1"; top: 2px; left: 1px; } +.raml-icon:before { font-family: file-icons; font-size: 15px; content: "\e913"; top: 1px; font-size: 14px; } +.rascal-icon:before { font-family: file-icons; font-size: 15px; content: "\ea24"; top: 2px; } +.rdoc-icon:before { font-family: file-icons; font-size: 15px; content: "\e9b0"; top: 2px; left: 1px; } +.react-icon:before { font-family: file-icons; font-size: 15px; content: "\f100"; top: 2px; } +.rebol-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ae"; top: 1px; font-size: 13px; } +.reason-icon:before { font-family: file-icons; font-size: 15px; content: "\ea1d"; top: 3px; } +.red-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ad"; top: 3px; font-size: 16px; } +.regex-icon:before { font-family: file-icons; font-size: 15px; content: "*"; top: 1px; font-size: 12px; left: 1px; } +.rexx-icon:before { font-family: file-icons; font-size: 15px; content: "\ea16"; top: 2px; font-size: 14px; left: 1px; } +.riot-icon:before { font-family: file-icons; font-size: 15px; content: "\e919"; top: 4px; font-size: 18px; } +.robot-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ac"; top: 2px; font-size: 14px; } +.rollup-icon:before { font-family: file-icons; font-size: 15px; content: "\ea20"; top: 2px; } +.rst-icon:before { font-family: file-icons; font-size: 15px; content: "\e9cc"; top: 3px; font-size: 16px; } +.sage-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ab"; top: 3px; font-size: 16px; -webkit-font-smoothing: subpixel-antialiased; } +.saltstack-icon:before { font-family: file-icons; font-size: 15px; content: "\e915"; top: 2px; font-size: 14px; } +.sas-icon:before { font-family: file-icons; font-size: 15px; content: "\e95a"; top: 2px; } +.sbt-icon:before { font-family: file-icons; font-size: 15px; content: "\e9d2"; top: 2px; font-size: 14px; } +.scd-icon:before { font-family: file-icons; font-size: 15px; content: "\e9a2"; top: 2px; } +.scad-icon:before { font-family: file-icons; font-size: 15px; content: "\e911"; top: 2px; font-size: 14px; } +.scheme-icon:before { font-family: file-icons; font-size: 15px; content: "\03bb"; top: 2px; } +.scilab-icon:before { font-family: file-icons; font-size: 15px; content: "\e9a9"; top: 3px; font-size: 18px; left: -1px; -webkit-font-smoothing: subpixel-antialiased; } +.scrutinizer-icon:before { font-family: file-icons; font-size: 15px; content: "\e9d4"; top: 2px; font-size: 14px; } +.self-icon:before { font-family: file-icons; font-size: 15px; content: "\e9a8"; top: 3px; font-size: 16px; text-shadow: 0 0 0; transform: scale(1.2); } +.sf-icon:before { font-family: file-icons; font-size: 15px; content: "\e9db"; top: 2px; } +.shen-icon:before { font-family: file-icons; font-size: 15px; content: "\e9a7"; top: 2px; font-size: 16px; } +.shopify-icon:before { font-family: file-icons; font-size: 15px; content: "\e9cf"; top: 2px; } +.shuriken-icon:before { font-family: file-icons; font-size: 15px; content: "\272b"; top: 2px; font-size: 14px; } +.sigils-icon:before { font-family: file-icons; font-size: 15px; content: "\1f764";top: 3px; font-size: 16px; text-shadow: 0 0 0; } +.silverstripe-icon:before { font-family: file-icons; font-size: 15px; content: "\e800"; top: 2px; } +.sketch-icon:before { font-family: file-icons; font-size: 15px; content: "\e927"; top: 2px; } +.slash-icon:before { font-family: file-icons; font-size: 15px; content: "\e9a6"; top: 2px; } +.snyk-icon:before { font-family: file-icons; font-size: 15px; content: "\ea1c"; top: 2px; font-size: 16px; } +.sparql-icon:before { font-family: file-icons; font-size: 15px; content: "\e959"; top: 2px; } +.sqf-icon:before { font-family: file-icons; font-size: 15px; content: "\e9a5"; top: 1px; text-shadow: 0 0 0; } +.sqlite-icon:before { font-family: file-icons; font-size: 15px; content: "\e9dd"; top: 3px; } +.stan-icon:before { font-family: file-icons; font-size: 15px; content: "\e9a4"; top: 2px; } +.stata-icon:before { font-family: file-icons; font-size: 15px; content: "\e9a3"; top: 2px; } +.storyist-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ef"; top: 2px; font-size: 16px; } +.strings-icon:before { font-family: file-icons; font-size: 15px; content: "\e9e0"; top: 2px; } +.stylelint-icon:before { font-family: file-icons; font-size: 15px; content: "\e93d"; top: 2px; } +.stylus-icon:before { font-family: file-icons; font-size: 15px; content: "s"; top: 2px; left: 1px; } +.sublime-icon:before { font-family: file-icons; font-size: 15px; content: "\e986"; top: 2px; } +.svn-icon:before { font-family: file-icons; font-size: 15px; content: "\ea17"; top: 2px; } +.sysverilog-icon:before { font-family: file-icons; font-size: 15px; content: "\e9c3"; top: 2px; } +.tag-icon:before { font-family: file-icons; font-size: 15px; content: "\f015"; top: 2px; font-size: 14px; } +.tcl-icon:before { font-family: file-icons; font-size: 15px; content: "\e956"; top: 2px; font-size: 16px; } +.terminal-icon:before { font-family: file-icons; font-size: 15px; content: "\f0c8"; top: 2px; font-size: 14px; } +.tern-icon:before { font-family: file-icons; font-size: 15px; content: "\1f54a";top: 4px; font-size: 16px; } +.terraform-icon:before { font-family: file-icons; font-size: 15px; content: "\e916"; top: 1px; font-size: 14px; } +.tex-icon:before { font-family: file-icons; font-size: 15px; content: "\e600"; top: 4px; font-size: 16px; -webkit-font-smoothing: subpixel-antialiased; } +.textile-icon:before { font-family: file-icons; font-size: 15px; content: "t"; top: 2px; } +.textmate-icon:before { font-family: file-icons; font-size: 15px; content: "\2122"; top: 2px; font-size: 16px; } +.thor-icon:before { font-family: file-icons; font-size: 15px; content: "\e9d8"; top: 2px; } +.ts-icon:before { font-family: file-icons; font-size: 15px; content: "\2a6"; top: 1px; font-size: 14px; } +.tsx-icon:before { font-family: file-icons; font-size: 15px; content: "\e9e7"; top: 1px; font-size: 14px; } +.turing-icon:before { font-family: file-icons; font-size: 15px; content: "\e9b6"; top: 2px; } +.txl-icon:before { font-family: file-icons; font-size: 15px; content: "\e9c1"; top: 2px; } +.typedoc-icon:before { font-family: file-icons; font-size: 15px; content: "\e9fe"; top: 2px; } +.typings-icon:before { font-family: file-icons; font-size: 15px; content: "\e9df"; top: 2px; } +.uno-icon:before { font-family: file-icons; font-size: 15px; content: "\e9b3"; top: 2px; } +.unreal-icon:before { font-family: file-icons; font-size: 15px; content: "u"; top: 2px; } +.urweb-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ba"; top: 4px; font-size: 18px; left: -1px; text-shadow: 0 0 0; } +.webpack-icon:before { font-family: file-icons; font-size: 15px; content: "\e91e"; top: 3px; } +.wercker-icon:before { font-family: file-icons; font-size: 15px; content: "\ea19"; top: 2px; } +.word-icon:before { font-family: file-icons; font-size: 15px; content: "\e9ed"; top: 2px; } +.v8-icon:before { font-family: file-icons; font-size: 15px; content: "\ea1f"; top: 3px; font-size: 16px; } +.vagrant-icon:before { font-family: file-icons; font-size: 15px; content: "V"; top: 2px; font-size: 14px; } +.varnish-icon:before { font-family: file-icons; font-size: 15px; content: "\e9b4"; top: 1px; font-size: 14px; } +.verilog-icon:before { font-family: file-icons; font-size: 15px; content: "\e949"; top: 2px; } +.vhdl-icon:before { font-family: file-icons; font-size: 15px; content: "\e9aa"; top: 2px; } +.video-icon:before { font-family: file-icons; font-size: 15px; content: "\f057"; top: 1px; font-size: 14px; } +.vue-icon:before { font-family: file-icons; font-size: 15px; content: "\e906"; top: 3px; } +.x10-icon:before { font-family: file-icons; font-size: 15px; content: "\2169"; top: 2px; } +.xmos-icon:before { font-family: file-icons; font-size: 15px; content: "X"; top: 1px; font-size: 14px; } +.xojo-icon:before { font-family: file-icons; font-size: 15px; content: "\e9af"; top: 2px; } +.xpages-icon:before { font-family: file-icons; font-size: 15px; content: "\e9c5"; top: 2px; } +.xtend-icon:before { font-family: file-icons; font-size: 15px; content: "\e9c6"; top: 2px; } +.yang-icon:before { font-family: file-icons; font-size: 15px; content: "\262f"; top: 2px; } +.yarn-icon:before { font-family: file-icons; font-size: 15px; content: "\ea1a"; top: 2px; font-size: 16px; } +.yui-icon:before { font-family: file-icons; font-size: 15px; content: "\ea00"; top: 2px; } +.zbrush-icon:before { font-family: file-icons; font-size: 15px; content: "\e9f2"; top: 2px; font-size: 16px; } +.zephir-icon:before { font-family: file-icons; font-size: 15px; content: "\e9c7"; top: 2px; -webkit-font-smoothing: subpixel-antialiased; } +.zimpl-icon:before { font-family: file-icons; font-size: 15px; content: "\e9c8"; top: 2px; font-size: 16px; left: 1px; } diff --git a/libs/file-icons.js b/libs/file-icons.js new file mode 100644 index 0000000..bbc6556 --- /dev/null +++ b/libs/file-icons.js @@ -0,0 +1,1426 @@ +/** + * ╭─╮ ┬ ┬ ╭─╮ ┬ ╭─╮ ╭─╮ ╭╮╭ ╭─╮ + * ├┤ │ │ ├┤ │ │ │ │ │││ ╰─╮ + * ┴ ┴ ┴─╯ ╰─╯ ┴ ╰─╯ ╰─╯ ╯╰╯ ╰─╯ + * File specific icons for the browser + * from Atom File-icons, https://github.com/file-icons/atom + * + * @link https://github.com/file-icons/atom + * @author Daniel Brooker, + * @author Adnan M.Sagar, + */ + +;(function(root, factory) { + if (typeof define === 'function' && define.amd) { + define([], function() { return (root.FileIcons = factory()) }) + } else if (typeof module === 'object' && module.exports) { module.exports = factory() + } else { root.FileIcons = factory() } +}(this, function() { + + var root = this || global + var cache = { + directoryName: {}, + directoryPath: {}, + fileName: {}, + filePath: {}, + interpreter: {}, + scope: {}, + language: {}, + signature: {} + } + + /* --------------------------------------------------------------------------- + * Icon + * ------------------------------------------------------------------------- */ + + /** + * Create Icon instance + * + * @param {Number} index - Index of the icon's appearance in the enclosing array + * @param {Array} data - icon's data points that contains the following, + * + * @property {Icon} icon - Icon's CSS class (e.g., "js-icon") + * @property {Array} colour - Icon's colour classes + * @property {RegExp} match - Pattern for matching names or pathnames + * @property {Numeric} [priority=1] - priority that determined icon's order of appearance + * @property {Boolean} [matchPath=false] - Match against system path instead of basename + * @property {RegExp} [interpreter=null] - to match executable names in hashbangs + * @property {RegExp} [scope=null] - to match grammar scope-names + * @property {RegExp} [lang=null] - to match alias patterns + * @property {RegExp} [sig=null] - to match file signatures + * + * @constructor + */ + + var Icon = function(index, data) { + this.index = index + this.icon = data[0] + this.colour = data[1] + this.match = data[2] + this.priority = data[3] || 1 + this.matchPath = data[4] || false + this.interpreter = data[5] || null + this.scope = data[6] || null + this.lang = data[7] || null + this.signature = data[8] || null + } + + /** + * Return the CSS classes for displaying the icon. + * + * @param {Number|null} colourMode + * @param {Boolean} asArray + * @return {String} + */ + + Icon.prototype.getClass = function(colourMode, asArray) { + + colourMode = colourMode !== undefined ? colourMode : null + asArray = asArray !== undefined ? asArray : false + + // No colour needed or available + if (colourMode === null || this.colour[0] === null) + return asArray ? [this.icon] : this.icon + + return asArray + ? [this.icon, this.colour[colourMode]] + : this.icon + " " + this.colour[colourMode] + } + + /* --------------------------------------------------------------------------- + * IconTables + * ------------------------------------------------------------------------- */ + + /** + * Create IconTables instance + * + * @param {Array} data - Icons database + * + * @property {Array} directoryIcons - Icons to match directory-type resources. + * @property {Array} fileIcons - Icons to match file resources. + * @property {Icon} binaryIcon - Icon for binary files. + * @property {Icon} executableIcon - Icon for executables. + * @class + * @constructor + */ + + var IconTables = function(data) { + this.directoryIcons = this.read(data[0]) + this.fileIcons = this.read(data[1]) + this.binaryIcon = this.matchScope("source.asm") + this.executableIcon = this.matchInterpreter("bash") + } + + /** + * Populate icon-lists from a icons data table. + * + * @param {Array} table + * @return {Object} + * @private + */ + + IconTables.prototype.read = function(table) { + + var icons = table[0] + var indexes = table[1] + + icons = icons.map(function(icon, index) { + return new Icon(index, icon) + }) + + // Dereference Icon instances from their stored offset + indexes = indexes.map(function(index) { + return index.map(function(offset) { + return icons[offset] + }) + }) + + return { + byName: icons, + byInterpreter: indexes[0], + byLanguage: indexes[1], + byPath: indexes[2], + byScope: indexes[3], + bySignature: indexes[4] + } + } + + /** + * Match an icon using a resource's basename. + * + * @param {String} name - Name of filesystem entity + * @param {Boolean} [directory=false] - Match folders instead of files + * @return {Icon} + */ + IconTables.prototype.matchName = function(name, directory) { + + directory = directory !== undefined + ? directory + : false + var cachedIcons = directory + ? this.cache.directoryName + : cache.fileName + var icons = directory + ? this.directoryIcons.byName + : this.fileIcons.byName + + if (cachedIcons[name]) { + return cachedIcons[name] + } + + for (var i in icons) { + var icon = icons[i] + if (icon.match.test(name)) { + return cachedIcons[name] = icon + } + } + return null + } + + /** + * Match an icon using a resource's system path. + * + * @param {String} path - Full pathname to check + * @param {Boolean} [directory=false] - Match folders instead of files + * @return {Icon} + */ + IconTables.prototype.matchPath = function(path, directory) { + + directory = directory !== undefined + ? directory + : false + var cachedIcons = directory + ? cache.directoryName + : cache.fileName + var icons = directory + ? this.directoryIcons.byPath + : this.fileIcons.byPath + + if (cachedIcons[name]) { + return cachedIcons[name] + } + + for (var i in icons) { + var icon = icons[i] + if (icon.match.test(path)) { + return cachedIcons[path] = icon + } + } + return null + } + + /** + * Match an icon using the human-readable form of its related language. + * + * Typically used for matching modelines and Linguist-language attributes. + * + * @example IconTables.matchLanguage("JavaScript") + * @param {String} name - Name/alias of language + * @return {Icon} + */ + IconTables.prototype.matchLanguage = function(name) { + + if (cache.language[name]) { + return cache.language[name] + } + + for (var i in this.fileIcons.byLanguage) { + var icon = this.fileIcons.byLanguage[i] + if (icon.lang.test(name)) { + return cache.language[name] = icon + } + } + return null + } + + /** + * Match an icon using the grammar-scope assigned to it. + * + * @example IconTables.matchScope("source.js") + * @param {String} name + * @return {Icon} + */ + IconTables.prototype.matchScope = function(name) { + + if (cache.scope[name]) { + return cache.scope[name] + } + + for (var i in this.fileIcons.byScope) { + var icon = this.fileIcons.byScope[i] + if (icon.scope.test(name)) { + return cache.scope[name] = icon + } + } + return null + } + + /** + * Match an icon using the name of an interpreter which executes its language. + * + * Used for matching interpreter directives (a.k.a., "hashbangs"). + * + * @example IconTables.matchInterpreter("bash") + * @param {String} name + * @return {Icon} + */ + IconTables.prototype.matchInterpreter = function(name) { + + if (cache.interpreter[name]) { + return cache.interpreter[name] + } + + for (var i in this.fileIcons.byInterpreter) { + var icon = this.fileIcons.byInterpreter[i] + if (icon.interpreter.test(name)) { + return cache.interpreter[name] = icon + } + } + return null + } + + /** + * Match an icon using a resource's file signature. + * + * @example IconTables.matchSignature("\x1F\x8B") + * @param {String} data + * @return {Icon} + */ + IconTables.prototype.matchSignature = function(data) {} + + /* --------------------------------------------------------------------------- + * Icons Database + * ------------------------------------------------------------------------- */ + + var icondb = [ + [[["arttext-icon",["dark-purple","dark-purple"],/\.artx$/i], + ["atom-icon",["dark-green","dark-green"],/^\.atom$/], + ["bower-icon",["medium-yellow","medium-orange"],/^bower[-_]components$/], + ["dropbox-icon",["medium-blue","medium-blue"],/^(?:Dropbox|\.dropbox\.cache)$/], + ["emacs-icon",["medium-purple","medium-purple"],/^\.emacs\.d$/], + ["dylib-icon",[null,null],/\.framework$/i], + ["git-icon",["medium-red","medium-red"],/\.git$/], + ["github-icon",[null,null],/^\.github$/], + ["meteor-icon",["dark-orange","dark-orange"],/^\.meteor$/], + ["node-icon",["medium-green","medium-green"],/^node_modules$/], + ["package-icon",[null,null],/^\.bundle$/i], + ["svn-icon",[null,null],/^\.svn$/i], + ["textmate-icon",[null,null],/\.tmBundle$/i], + ["vagrant-icon",["medium-cyan","medium-cyan"],/\.vagrant$/i], + ["appstore-icon",[null,null],/\.xcodeproj$/i]], + [[],[],[],[],[]]], + [[["binary-icon",["dark-green","dark-green"],/\.swp$/i,4], + ["link-icon",["medium-blue","medium-blue"],/\.lnk$/i,3], + ["angular-icon",["medium-red","medium-red"],/^angular[^.]*\.js$/i,2], + ["ant-icon",["dark-pink","dark-pink"],/^ant\.xml$|\.ant$/i,2], + ["apache-icon",["medium-red","medium-red"],/^(?:apache2?|httpd).conf$/i,2], + ["apache-icon",["dark-green","dark-green"],/\.vhost$/i,2], + ["apache-icon",["medium-green","medium-green"],/\.thrift$/i,2], + ["appcelerator-icon",["medium-red","medium-red"],/^appcelerator\.js$/i,2], + ["appveyor-icon",["medium-blue","medium-blue"],/^appveyor\.yml$/i,2], + ["archlinux-icon",["dark-purple","dark-purple"],/^\.install$/,2], + ["archlinux-icon",["dark-maroon","dark-maroon"],/^\.SRCINFO$/,2], + ["archlinux-icon",["dark-yellow","dark-yellow"],/^pacman\.conf$/,2], + ["archlinux-icon",["light-yellow","light-yellow"],/^pamac\.conf$/,2], + ["archlinux-icon",["dark-cyan","dark-cyan"],/^PKGBUILD$/,2], + ["archlinux-icon",["light-yellow","light-yellow"],/yaourtrc$/i,2], + ["backbone-icon",["dark-blue","dark-blue"],/^backbone(?:[-.]min|dev)?\.js$/i,2], + ["boot-icon",["medium-green","dark-green"],/^Makefile\.boot$/i,2], + ["bootstrap-icon",["medium-yellow","dark-yellow"],/^(?:custom\.)?bootstrap\S*\.js$/i,2], + ["bootstrap-icon",["medium-blue","medium-blue"],/^(?:custom\.)?bootstrap\S*\.css$/i,2], + ["bootstrap-icon",["dark-blue","dark-blue"],/^(?:custom\.)?bootstrap\S*\.less$/i,2], + ["bootstrap-icon",["light-pink","light-pink"],/^(?:custom\.)?bootstrap\S*\.scss$/i,2], + ["bootstrap-icon",["medium-green","medium-green"],/^(?:custom\.)?bootstrap\S*\.styl$/i,2], + ["bower-icon",["medium-yellow","medium-orange"],/^(?:\.bowerrc|bower\.json|Bowerfile)$/i,2], + ["brakeman-icon",["medium-red","medium-red"],/brakeman\.yml$/i,2], + ["brakeman-icon",["dark-red","dark-red"],/^brakeman\.ignore$/i,2], + ["broccoli-icon",["medium-green","medium-green"],/^Brocfile\./i,2], + ["package-icon",["light-orange","light-orange"],/Cargo\.toml$/i,2], + ["package-icon",["dark-orange","dark-orange"],/Cargo\.lock$/i,2], + ["chai-icon",["medium-red","dark-red"],/^chai\.(?:[jt]sx?|es6?|coffee)$/i,2], + ["chartjs-icon",["dark-pink","dark-pink"],/^Chart\.js$/i,2], + ["circleci-icon",["medium-green","medium-green"],/^circle\.yml$/i,2], + ["cc-icon",["medium-green","medium-green"],/\.codeclimate\.yml$/i,2], + ["codecov-icon",["dark-pink","dark-pink"],/^codecov\.ya?ml$/i,2], + ["coffee-icon",["medium-cyan","medium-cyan"],/\.coffee\.ecr$/i,2], + ["coffee-icon",["medium-red","medium-red"],/\.coffee\.erb$/i,2], + ["compass-icon",["medium-red","medium-red"],/^_?(?:compass|lemonade)\.scss$/i,2], + ["composer-icon",["medium-yellow","medium-yellow"],/^composer\.(?:json|lock)$/i,2], + ["composer-icon",["dark-blue","dark-blue"],/^composer\.phar$/i,2], + ["cordova-icon",["light-blue","light-blue"],/^cordova(?:[^.]*\.|-(?:\d\.)+)js$/i,2], + ["d3-icon",["medium-orange","medium-orange"],/^d3(?:\.v\d+)?[^.]*\.js$/i,2], + ["database-icon",["medium-red","medium-red"],/^METADATA\.pb$/,2], + ["database-icon",["medium-red","medium-red"],/\.git[\/\\](?:.*[\/\\])?(?:HEAD|ORIG_HEAD|packed-refs|logs[\/\\](?:.+[\/\\])?[^\/\\]+)$/,2,true], + ["docker-icon",["dark-blue","dark-blue"],/^(?:Dockerfile|docker-compose)|\.docker(?:file|ignore)$/i,2,false,,/\.dockerfile$/i,/^Docker$/i], + ["docker-icon",["dark-orange","dark-orange"],/^docker-sync\.yml$/i,2], + ["dojo-icon",["light-red","light-red"],/^dojo\.js$/i,2], + ["ember-icon",["medium-red","medium-red"],/^ember(?:\.|(?:-[^.]+)?-(?:\d+\.)+(?:debug\.)?)js$/i,2], + ["eslint-icon",["medium-purple","medium-purple"],/\.eslint(?:cache|ignore)$/i,2], + ["eslint-icon",["light-purple","light-purple"],/\.eslintrc(?:\.(?:js|json|ya?ml))?$/i,2], + ["extjs-icon",["light-green","light-green"],/\bExtjs(?:-ext)?\.js$/i,2], + ["fabfile-icon",["medium-blue","medium-blue"],/^fabfile\.py$/i,2], + ["fuelux-icon",["medium-orange","dark-orange"],/^fuelux(?:\.min)?\.(?:css|js)$/i,2], + ["gear-icon",["medium-blue","medium-blue"],/\.indent\.pro$/i,2], + ["grunt-icon",["medium-yellow","medium-yellow"],/gruntfile\.js$/i,2], + ["grunt-icon",["medium-maroon","medium-maroon"],/gruntfile\.coffee$/i,2], + ["gulp-icon",["medium-red","medium-red"],/gulpfile\.js$|gulpfile\.babel\.js$/i,2], + ["gulp-icon",["medium-maroon","medium-maroon"],/gulpfile\.coffee$/i,2], + ["html5-icon",["medium-cyan","medium-cyan"],/\.html?\.ecr$/i,2], + ["html5-icon",["medium-red","medium-red"],/\.(?:html?\.erb|rhtml)$/i,2,false,,/\.html\.erb$/i,/^HTML$/i], + ["ionic-icon",["medium-blue","medium-blue"],/^ionic\.project$/,2], + ["js-icon",["medium-cyan","medium-cyan"],/\.js\.ecr$/i,2], + ["js-icon",["medium-red","medium-red"],/\.js\.erb$/i,2], + ["jquery-icon",["dark-blue","dark-blue"],/^jquery(?:[-.](?:min|latest|\d\.\d+(?:\.\d+)?))*\.(?:[jt]sx?|es6?|coffee|map)$/i,2], + ["jqueryui-icon",["dark-blue","dark-blue"],/^jquery(?:[-_.](?:ui[-_.](?:custom|dialog-?\w*)|effects)(?:\.[^.]*)?|[-.]?ui(?:-\d\.\d+(?:\.\d+)?)?(?:\.\w+)?)(?:[-_.]?min|dev)?\.(?:[jt]sx?|es6?|coffee|map|s?css|less|styl)$/i,2], + ["karma-icon",["medium-cyan","medium-cyan"],/^karma\.conf\.js$/i,2], + ["karma-icon",["medium-maroon","medium-maroon"],/^karma\.conf\.coffee$/i,2], + ["knockout-icon",["medium-red","medium-red"],/^knockout[-.](?:\d+\.){3}(?:debug\.)?js$/i,2], + ["leaflet-icon",["medium-green","medium-green"],/^leaflet\.(?:draw-src|draw|spin|coordinates-(?:\d+\.)\d+\.\d+\.src)\.(?:js|css)$|^wicket-leaflet\.js$/i,2], + ["lein-icon",[null,null],/project\.clj$/i,2], + ["manpage-icon",["dark-green","dark-green"],/^tmac\.|^(?:mmn|mmt)$/i,2], + ["marko-icon",["medium-blue","medium-blue"],/\.marko$/i,2,false,/^marko$/,/\.marko$/i,/^mark[0o]$/i], + ["marko-icon",["medium-maroon","medium-maroon"],/\.marko\.js$/i,2], + ["materialize-icon",["light-red","light-red"],/^materialize(?:\.min)?\.(?:js|css)$/i,2], + ["mathjax-icon",["dark-green","dark-green"],/^MathJax[^.]*\.js$/i,2], + ["mocha-icon",["medium-maroon","medium-maroon"],/^mocha\.(?:[jt]sx?|es6?|coffee)$/i,2], + ["mocha-icon",["medium-red","medium-red"],/^mocha\.(?:s?css|less|styl)$/i,2], + ["mocha-icon",["light-maroon","light-maroon"],/mocha\.opts$/i,2], + ["modernizr-icon",["medium-red","medium-red"],/^modernizr(?:[-\.]custom|-\d\.\d+)(?:\.\d+)?\.js$/i,2], + ["mootools-icon",["medium-purple","medium-purple"],/^mootools[^.]*\d+\.\d+(?:.\d+)?[^.]*\.js$/i,2], + ["neko-icon",["dark-orange","dark-orange"],/^run\.n$/,2], + ["newrelic-icon",["medium-cyan","medium-cyan"],/^newrelic\.yml/i,2], + ["nginx-icon",["dark-green","dark-green"],/^nginx\.conf$/i,2], + ["shuriken-icon",["dark-cyan","dark-cyan"],/\.ninja\.d$/i,2], + ["nodemon-icon",["medium-green","medium-green"],/^nodemon\.json$|^\.nodemonignore$/i,2], + ["normalize-icon",["medium-red","medium-red"],/^normalize\.(?:css|less|scss|styl)$/i,2], + ["npm-icon",["medium-red","medium-red"],/^(?:package\.json|\.npmignore|\.?npmrc|npm-debug\.log|npm-shrinkwrap\.json)$/i,2], + ["postcss-icon",["medium-yellow","dark-yellow"],/\bpostcss\.config\.js$/i,2], + ["protractor-icon",["medium-red","medium-red"],/^protractor\.conf\./i,2], + ["pug-icon",["medium-orange","medium-orange"],/^\.pug-lintrc/i,2], + ["raphael-icon",["medium-orange","medium-orange"],/^raphael(?:\.min|\.no-deps)*\.js$/i,2], + ["react-icon",["dark-blue","dark-blue"],/^react(?:-[^.]*)?\.js$/i,2], + ["react-icon",["medium-blue","dark-blue"],/\.react\.js$/i,2], + ["book-icon",["medium-blue","medium-blue"],/^README(?:\b|_)|^(?:licen[sc]es?|(?:read|readme|click|delete|keep|test)\.me)$|\.(?:readme|1st)$/i,2], + ["book-icon",["dark-blue","dark-blue"],/^(?:notice|bugs|changes|change[-_]?log(?:[-._]?\d+)?|contribute|contributing|contributors|copying|hacking|history|install|maintainers|manifest|more\.stuff|projects|revision|terms|thanks)$/i,2], + ["requirejs-icon",["medium-blue","medium-blue"],/^require(?:[-.]min|dev)?\.js$/i,2], + ["clojure-icon",["medium-maroon","dark-maroon"],/^riemann\.config$/i,2], + ["rollup-icon",["medium-red","medium-red"],/^rollup\.config\./i,2], + ["ruby-icon",["light-green","light-green"],/_spec\.rb$/i,2], + ["scrutinizer-icon",["dark-blue","dark-blue"],/\.scrutinizer\.yml$/i,2], + ["sencha-icon",["light-green","light-green"],/^sencha(?:\.min)?\.js$/i,2], + ["snapsvg-icon",["medium-cyan","medium-cyan"],/^snap\.svg(?:[-.]min)?\.js$/i,2], + ["sourcemap-icon",["medium-blue","medium-blue"],/\.css\.map$/i,2], + ["sourcemap-icon",["medium-yellow","dark-yellow"],/\.js\.map$/i,2], + ["stylelint-icon",["medium-purple","medium-purple"],/^\.stylelintrc(?:\.|$)/i,2], + ["stylelint-icon",["medium-yellow","dark-yellow"],/^stylelint\.config\.js$/i,2], + ["stylelint-icon",["dark-blue","dark-blue"],/\.stylelintignore$/i,2], + ["toc-icon",["medium-cyan","dark-cyan"],/\.toc$/i,2,false,,/\.toc$/i,/^Table of Contents$/i], + ["calc-icon",["medium-maroon","medium-maroon"],/\.8x[pk](?:\.txt)?$/i,2,false,,,,/^\*\*TI[789]\d\*\*/], + ["travis-icon",["medium-red","medium-red"],/^\.travis/i,2], + ["typedoc-icon",["dark-purple","dark-purple"],/^typedoc\.json$/i,2], + ["typings-icon",["medium-maroon","medium-maroon"],/^typings\.json$/i,2], + ["uikit-icon",["medium-blue","medium-blue"],/^uikit(?:\.min)?\.js$/i,2], + ["webpack-icon",["medium-blue","medium-blue"],/webpack\.config\.|^webpackfile\.js$/i,2], + ["wercker-icon",["medium-purple","medium-purple"],/^wercker\.ya?ml$/i,2], + ["yarn-icon",["medium-blue","medium-blue"],/^yarn\.lock$/i,2], + ["yeoman-icon",["medium-cyan","medium-cyan"],/\.yo-rc\.json$/i,2], + ["yui-icon",["dark-blue","dark-blue"],/^(?:yahoo-|yui)[^.]*\.js$/i,2], + ["emacs-icon",["medium-red","medium-red"],/\.gnus$/i,1.5], + ["emacs-icon",["dark-green","dark-green"],/\.viper$/i,1.5], + ["emacs-icon",["dark-blue","dark-blue"],/^Cask$/,1.5], + ["emacs-icon",["medium-blue","medium-blue"],/^Project\.ede$/i,1.5], + ["_1c-icon",["medium-red","medium-red"],/\.bsl$/i,,false,,/\.bsl$/i,/^1C$|^1[\W_ \t]?C[\W_ \t]?Enterprise$/i], + ["_1c-icon",["dark-orange","dark-orange"],/\.sdbl$/i,,false,,/\.sdbl$/i,/^1C$|^1[\W_ \t]?C[\W_ \t]?Query$/i], + ["_1c-icon",["dark-red","dark-red"],/\.os$/i], + ["_1c-alt-icon",["medium-red","dark-red"],/\.mdo$/i], + ["abap-icon",["medium-orange","medium-orange"],/\.abap$/i,,false,,/\.abp$/i,/^ABAP$/i], + ["as-icon",["medium-blue","medium-blue"],/\.swf$/i], + ["as-icon",["medium-red","medium-red"],/\.as$/i,,false,,/\.(?:flex-config|actionscript(?:\.\d+)?)$/i,/^ActionScript$|^(?:ActionScript\s*3|as3)$/i], + ["as-icon",["medium-yellow","dark-yellow"],/\.jsfl$/i], + ["as-icon",["dark-red","dark-red"],/\.swc$/i], + ["ada-icon",["medium-blue","medium-blue"],/\.(?:ada|adb|ads)$/i,,false,,/\.ada$/i,/^Ada$|^(?:ada95|ada2005)$/i], + ["ae-icon",["dark-pink","dark-pink"],/\.aep$/i], + ["ae-icon",["dark-purple","dark-purple"],/\.aet$/i], + ["ai-icon",["medium-orange","medium-orange"],/\.ai$/i], + ["ai-icon",["dark-orange","dark-orange"],/\.ait$/i], + ["indesign-icon",["dark-pink","dark-pink"],/\.indd$|\.idml$/i], + ["indesign-icon",["medium-purple","medium-purple"],/\.indl$/i], + ["indesign-icon",["dark-purple","dark-purple"],/\.indt$|\.inx$/i], + ["indesign-icon",["dark-blue","dark-blue"],/\.indb$/i], + ["psd-icon",["medium-blue","medium-blue"],/\.psd$/i,,false,,,,/^8BPS/], + ["psd-icon",["dark-purple","dark-purple"],/\.psb$/i], + ["premiere-icon",["dark-purple","dark-purple"],/\.prproj$/i], + ["premiere-icon",["medium-maroon","medium-maroon"],/\.prel$/i], + ["premiere-icon",["medium-purple","medium-purple"],/\.psq$/i], + ["alloy-icon",["medium-red","medium-red"],/\.als$/i,,false,,/\.alloy$/i,/^Alloy$/i], + ["alpine-icon",["dark-blue","dark-blue"],/(?:\.|^)APKBUILD$/], + ["ampl-icon",["dark-maroon","dark-maroon"],/\.ampl$/i,,false,,/\.ampl$/i,/^AMPL$/i], + ["sun-icon",["medium-yellow","dark-yellow"],/\.ansiweatherrc$/i], + ["antlr-icon",["medium-red","medium-red"],/\.g$/i,,false,/^antlr$/,/\.antlr$/i,/^antlr$/i], + ["antlr-icon",["medium-orange","medium-orange"],/\.g4$/i], + ["apache-icon",["dark-red","dark-red"],/\.apacheconf$/i,,false,,/\.apache-config$/i,/^Apache$|^(?:aconf|ApacheConf)$/i], + ["apache-icon",["medium-purple","medium-purple"],/apache2[\\\/]magic$/i,,true], + ["api-icon",["medium-blue","medium-blue"],/\.apib$/i,,false,,/\.apib$/i,/^API Blueprint$/i], + ["apl-icon",["dark-cyan","dark-cyan"],/\.apl$/i,,false,/^apl$/,/\.apl$/i,/^apl$/i], + ["apl-icon",["medium-maroon","medium-maroon"],/\.apl\.history$/i], + ["apple-icon",["medium-purple","medium-purple"],/\.(?:applescript|scpt)$/i,,false,/^osascript$/,/\.applescript$/i,/^Apple$|^[0o]sascript$/i], + ["arc-icon",["medium-blue","medium-blue"],/\.arc$/i], + ["arduino-icon",["dark-cyan","dark-cyan"],/\.ino$/i,,false,,/\.arduino$/i,/^Arduino$/i], + ["asciidoc-icon",["medium-blue","medium-blue"],/\.(?:ad|adoc|asc|asciidoc)$/i,,false,,/\.asciidoc$/i,/^AsciiDoc$/i], + ["asp-icon",["dark-blue","dark-blue"],/\.asp$/i,,false,,/\.asp$/i,/^[Aa][Ss][Pp][\W_ \t]?[Nn][Ee][Tt]$|^aspx(?:-vb)?$/], + ["asp-icon",["medium-maroon","medium-maroon"],/\.asax$/i], + ["asp-icon",["dark-green","dark-green"],/\.ascx$/i], + ["asp-icon",["medium-green","medium-green"],/\.ashx$/i], + ["asp-icon",["dark-cyan","dark-cyan"],/\.asmx$/i], + ["asp-icon",["medium-purple","medium-purple"],/\.aspx$/i], + ["asp-icon",["medium-cyan","medium-cyan"],/\.axd$/i], + ["eclipse-icon",["medium-maroon","medium-maroon"],/\.aj$/i], + ["binary-icon",["medium-red","medium-red"],/\.(?:l?a|[ls]?o|out|s|a51|n?asm|axf|elf|prx|puff|was[mt]|z80)$|\.rpy[bc]$/i,,false,,/(?:^|\.)(?:a[rs]m|x86|z80|lc-?3|cpu12|x86asm|m68k|assembly|avr(?:dis)?asm|dasm)(?:\.|$)/i,/^Assembly$|^n?asm$/i], + ["binary-icon",["dark-blue","dark-blue"],/\.agc$|\.d-objdump$/i,,false,,/\.source\.agc$/i,/^Assembly$|^(?:Virtual\s*)?AGC$|^Apollo(?:[-_\s]*11)?\s*Guidance\s*Computer$/i], + ["binary-icon",["dark-green","dark-green"],/\.ko$/i], + ["binary-icon",["medium-blue","medium-blue"],/\.lst$/i,,false,/^lst-cpu12$/,/\.lst-cpu12$/i,/^Assembly$|^lst[\W_ \t]?cpu12$/i], + ["binary-icon",["dark-orange","dark-orange"],/\.(?:(?:c(?:[+px]{2}?)?-?)?objdump|bsdiff|bin|dat|pak|pdb)$/i], + ["binary-icon",["medium-orange","medium-orange"],/\.gcode|\.gco/i], + ["binary-icon",["dark-purple","dark-purple"],/\.py[co]$/i], + ["binary-icon",[null,null],/\.DS_Store$/i], + ["ats-icon",["medium-red","medium-red"],/\.dats$/i,,false,,/\.ats$/i,/^ATS$|^ats2$/i], + ["ats-icon",["medium-blue","medium-blue"],/\.hats$/i], + ["ats-icon",["dark-yellow","dark-yellow"],/\.sats$/i], + ["audacity-icon",["medium-yellow","medium-yellow"],/\.aup$/i], + ["audio-icon",["medium-red","medium-red"],/\.mp3$/i,,false,,,,/^\xFF\xFB|^ID3/], + ["audio-icon",["dark-yellow","dark-yellow"],/\.wav$/i,,false,,,,/^RIFF(?!.+WEBP)/], + ["audio-icon",["dark-cyan","dark-cyan"],/\.(?:aac|ac3|m4p)$/i,,false,,,,/^\x0Bw/], + ["audio-icon",["medium-purple","medium-purple"],/\.aif[fc]?$/i,,false,,,,/^FORM.{4}AIFF/], + ["audio-icon",["medium-cyan","medium-cyan"],/\.au$/i,,false,,,,/^\.snd|^dns\./], + ["audio-icon",["dark-red","dark-red"],/\.flac$/i,,false,,,,/^fLaC/], + ["audio-icon",["medium-red","medium-red"],/\.f4[ab]$/i,,false,,,,/^FLV\x01\x04/], + ["audio-icon",["medium-cyan","medium-cyan"],/\.m4a$/i,,false,,,,/^.{4}ftypM4A/], + ["audio-icon",["dark-green","dark-green"],/\.(?:mpc|mp\+)$/i,,false,,,,/^MPCK/], + ["audio-icon",["dark-orange","dark-orange"],/\.oga$/i], + ["audio-icon",["dark-maroon","dark-maroon"],/\.opus$/i,,false,,,,/OpusHead/], + ["audio-icon",["dark-blue","dark-blue"],/\.r[am]$/i,,false,,,,/^\.RMF/], + ["audio-icon",["medium-blue","medium-blue"],/\.wma$/i], + ["augeas-icon",["dark-orange","dark-orange"],/\.aug$/i], + ["ahk-icon",["dark-blue","dark-blue"],/\.ahk$/i,,false,/^ahk$/,/\.ahk$/i,/^AutoHotkey$|^ahk$/i], + ["ahk-icon",["dark-purple","dark-purple"],/\.ahkl$/i], + ["autoit-icon",["medium-purple","medium-purple"],/\.au3$/i,,false,,/(?:^|\.)autoit(?:\.|$)/i,/^AutoIt$|^(?:AutoIt3|AutoItScript|au3)$/i], + ["terminal-icon",["medium-blue","medium-blue"],/\.awk$/i,,false,/^awk$/,/\.awk$/i,/^awk$/i], + ["terminal-icon",["medium-red","medium-red"],/\.gawk$/i,,false,/^gawk$/,/\.gawk$/i,/^AWK$|^gawk$/i], + ["terminal-icon",["medium-maroon","medium-maroon"],/\.mawk$/i,,false,/^mawk$/,/\.mawk$/i,/^AWK$|^mawk$/i], + ["terminal-icon",["dark-green","dark-green"],/\.nawk$/i,,false,/^nawk$/,/\.nawk$/i,/^AWK$|^nawk$/i], + ["terminal-icon",["dark-cyan","dark-cyan"],/\.auk$/i], + ["babel-icon",["medium-yellow","medium-yellow"],/\.(?:babelrc|languagebabel|babel)$/i], + ["babel-icon",["dark-yellow","dark-yellow"],/\.babelignore$/i], + ["bibtex-icon",["medium-red","dark-red"],/\.cbx$/i], + ["bibtex-icon",["medium-orange","dark-orange"],/\.bbx$/i], + ["bibtex-icon",["medium-yellow","dark-yellow"],/\.bib$/i,,false,/^bibtex$/,/\.bibtex$/i,/^bibtex$/i], + ["bibtex-icon",["medium-green","dark-green"],/\.bst$/i], + ["gnu-icon",["medium-red","medium-red"],/\.bison$/i,,false,,/\.bison$/i,/^Bison$/i], + ["blender-icon",["medium-orange","medium-orange"],/\.blend$/i], + ["blender-icon",["dark-orange","dark-orange"],/\.blend\d+$/i], + ["blender-icon",["dark-blue","dark-blue"],/\.bphys$/i], + ["bluespec-icon",["dark-blue","dark-blue"],/\.bsv$/i,,false,,/\.bsv$/i,/^Bluespec$/i], + ["boo-icon",["medium-green","medium-green"],/\.boo$/i,,false,,/\.boo(?:\.unity)?$/i,/^Boo$/i], + ["boot-icon",[null,null],/\.boot$/i], + ["brain-icon",["dark-pink","dark-pink"],/\.bf?$/i,,false,,/\.(?:bf|brainfuck)$/i,/^Brainfuck$|^(?:bf|Brainf\**ck)$/i], + ["brew-icon",["medium-orange","medium-orange"],/^Brewfile$/], + ["bro-icon",["dark-cyan","dark-cyan"],/\.bro$/i,,false,,/\.bro$/i,/^Bro$/i], + ["byond-icon",["medium-blue","medium-blue"],/\.dm$/i,,false,,/\.dm$/i,/^BYOND$|^(?:DM|Dream\s*Maker(?:\s*Script)?)$/i], + ["c-icon",["medium-blue","medium-blue"],/\.c$/i,,false,/^tcc$/,/\.c$/i,/^C$/i], + ["c-icon",["medium-purple","medium-purple"],/\.h$|\.cats$/i], + ["c-icon",["medium-green","medium-green"],/\.idc$/i], + ["c-icon",["medium-maroon","medium-maroon"],/\.w$/i], + ["c-icon",["dark-blue","dark-blue"],/\.nc$/i], + ["c-icon",["medium-cyan","medium-cyan"],/\.upc$/i], + ["csharp-icon",["medium-blue","dark-blue"],/\.cs$/i,,false,,/\.cs$/i,/^C#$|^c\s*sharp$/i], + ["csscript-icon",["dark-green","dark-green"],/\.csx$/i,,false,,/\.csx$/i,/^C#-Script$/i], + ["cpp-icon",["medium-blue","dark-blue"],/\.c[+px]{2}$|\.cc$/i,,false,,/\.cpp$/i,/^C\+\+$|c[-_]?pp|cplusplus/i], + ["cpp-icon",["medium-purple","dark-purple"],/\.h[+px]{2}$/i], + ["cpp-icon",["medium-orange","dark-orange"],/\.[it]pp$/i], + ["cpp-icon",["medium-red","dark-red"],/\.(?:tcc|inl)$/i], + ["cabal-icon",["medium-cyan","medium-cyan"],/\.cabal$/i,,false,,/\.cabal$/i,/^Cabal$/i], + ["cake-icon",["medium-yellow","medium-yellow"],/\.cake$/i,,false,,/\.cake$/i,/^Cake$/i], + ["cakefile-icon",["medium-red","medium-red"],/^Cakefile$/], + ["cakephp-icon",["medium-red","medium-red"],/\.ctp$/i], + ["ceylon-icon",["medium-orange","medium-orange"],/\.ceylon$/i], + ["chapel-icon",["medium-green","medium-green"],/\.chpl$/i,,false,,/\.chapel$/i,/^Chapel$|^chpl$/i], + ["chrome-icon",["medium-red","medium-red"],/\.crx$/i,,false,,,,/^Cr24/], + ["chuck-icon",["medium-green","medium-green"],/\.ck$/i,,false,,/\.chuck$/i,/^ChucK$/i], + ["cirru-icon",["medium-pink","dark-pink"],/\.cirru$/i,,false,,/\.cirru$/i,/^Cirru$/i], + ["clarion-icon",["medium-orange","medium-orange"],/\.clw$/i,,false,,/\.clarion$/i,/^Clarion$/i], + ["clean-icon",["dark-cyan","dark-cyan"],/\.icl$/i,,false,/^clean$/,/\.clean$/i,/^clean$/i], + ["clean-icon",["medium-cyan","medium-cyan"],/\.dcl$/i], + ["clean-icon",["medium-blue","medium-blue"],/\.abc$/i], + ["click-icon",["medium-yellow","medium-yellow"],/\.click$/i,,false,,/\.click$/i,/^Click$|^Click!$/i], + ["clips-icon",["dark-green","dark-green"],/\.clp$/i,,false,,/\.clips$/i,/^CLIPS$/i], + ["clojure-icon",["medium-blue","dark-blue"],/\.clj$/i,,false,/^clojure$/,/\.clojure$/i,/^cl[0o]jure$/i], + ["clojure-icon",["medium-purple","dark-purple"],/\.cl2$/i], + ["clojure-icon",["medium-green","dark-green"],/\.cljc$/i], + ["clojure-icon",["medium-red","dark-red"],/\.cljx$|\.hic$/i], + ["cljs-icon",["medium-blue","dark-blue"],/\.cljs(?:\.hl|cm)?$/i], + ["cmake-icon",["medium-green","medium-green"],/\.cmake$/i,,false,/^cmake$/,/\.cmake$/i,/^cmake$/i], + ["cmake-icon",["medium-red","medium-red"],/^CMakeLists\.txt$/], + ["coffee-icon",["medium-maroon","medium-maroon"],/\.coffee$/i,,false,/^coffee$/,/\.coffee$/i,/^CoffeeScript$|^Coffee(?:-Script)?$/i], + ["coffee-icon",["dark-maroon","dark-maroon"],/\.cjsx$/i], + ["coffee-icon",["light-maroon","light-maroon"],/\.litcoffee$/i,,false,/^litcoffee$/,/\.litcoffee$/i,/^CoffeeScript$|^litc[0o]ffee$/i], + ["coffee-icon",["medium-blue","medium-blue"],/\.iced$/i], + ["cf-icon",["light-cyan","light-cyan"],/\.cfc$/i,,false,,/\.cfscript$/i,/^ColdFusion$|^(?:CFC|CFScript)$/i], + ["cf-icon",["medium-cyan","medium-cyan"],/\.cfml?$/i,,false,,/\.cfml?$/i,/^ColdFusion$|^(?:cfml?|ColdFusion\s*HTML)$/i], + ["khronos-icon",["medium-orange","medium-orange"],/\.dae$/i], + ["cl-icon",["medium-orange","medium-orange"],/\.cl$/i,,false,/^(?:c?lisp|sbcl|[ec]cl)$/,/\.common-lisp$/i,/^Common Lisp$|^c?lisp$/i], + ["cp-icon",["medium-maroon","medium-maroon"],/\.cp$/i], + ["cp-icon",["dark-red","dark-red"],/\.cps$/i], + ["zip-icon",[null,null],/\.(?:zip|z|xz)$/i,,false,,,,/^(?:\x50\x4B(?:\x03\x04|\x05\x06|\x07|\x08)|\x1F[\x9D\xA0]|BZh|RNC[\x01\x02]|\xD0\xCF\x11\xE0)/], + ["zip-icon",["medium-blue","medium-blue"],/\.rar$/i,,false,,,,/^Rar!\x1A\x07\x01?\0/], + ["zip-icon",["dark-blue","dark-blue"],/\.t?gz$|\.tar$|\.whl$/i,,false,,,,/^\x1F\x8B/], + ["zip-icon",["medium-maroon","medium-maroon"],/\.(?:lzo?|lzma|tlz|tar\.lzma)$/i,,false,,,,/^LZIP/], + ["zip-icon",["medium-maroon","medium-maroon"],/\.7z$/i,,false,,,,/^7z\xBC\xAF\x27\x1C/], + ["zip-icon",["medium-red","medium-red"],/\.apk$|\.gem$/i], + ["zip-icon",["dark-cyan","dark-cyan"],/\.bz2$/i], + ["zip-icon",["medium-blue","medium-blue"],/\.iso$/i,,false,,,,/^\x45\x52\x02\0{3}|^\x8B\x45\x52\x02/], + ["zip-icon",["medium-orange","medium-orange"],/\.xpi$/i], + ["zip-icon",["medium-green","medium-green"],/\.epub$/i], + ["zip-icon",["dark-pink","dark-pink"],/\.jar$/i], + ["zip-icon",["medium-purple","medium-purple"],/\.war$/i], + ["zip-icon",["dark-orange","dark-orange"],/\.xar$/i,,false,,,,/^xar!/], + ["zip-icon",["light-orange","light-orange"],/\.egg$/i], + ["config-icon",["medium-yellow","medium-yellow"],/\.(?:ini|desktop|directory|cfg|conf|prefs)$/i,,false,,/\.ini$/i,/^d[0o]sini$/i], + ["config-icon",["medium-purple","medium-purple"],/\.properties$/i,,false,,/\.java-properties$/i], + ["config-icon",["medium-green","medium-green"],/\.toml$|\.opts$/i], + ["config-icon",["dark-red","dark-red"],/\.ld$/i], + ["config-icon",["medium-red","medium-red"],/\.lds$|\.reek$/i], + ["config-icon",["dark-blue","dark-blue"],/\.terminal$/i], + ["config-icon",["medium-orange","medium-orange"],/^ld\.script$/i], + ["config-icon",["dark-red","dark-red"],/\.git[\/\\](?:config|info[\/\\]\w+)$/,,true], + ["config-icon",["dark-orange","dark-orange"],/^\/(?:private\/)?etc\/(?:[^\/]+\/)*[^\/]*\.(?:cf|conf|ini)(?:\.default)?$/i,,true], + ["config-icon",["medium-maroon","medium-maroon"],/^\/(?:private\/)?etc\/(?:aliases|auto_(?:home|master)|ftpusers|group|gettytab|hosts(?:\.equiv)?|manpaths|networks|paths|protocols|services|shells|sudoers|ttys)$/i,,true], + ["coq-icon",["medium-maroon","medium-maroon"],/\.coq$/i,,false,,/\.coq$/i,/^Coq$/i], + ["creole-icon",["medium-blue","medium-blue"],/\.creole$/i,,false,,/\.creole$/i,/^Creole$/i], + ["crystal-icon",["medium-cyan","medium-cyan"],/\.e?cr$/i,,false,/^crystal$/,/\.crystal$/i,/^Crystal$/i], + ["csound-icon",["medium-maroon","medium-maroon"],/\.orc$/i,,false,,/\.csound$/i,/^Csound$|^cs[0o]und[\W_ \t]?[0o]rc$/i], + ["csound-icon",["dark-orange","dark-orange"],/\.udo$/i], + ["csound-icon",["dark-maroon","dark-maroon"],/\.csd$/i,,false,,/\.csound-document$/i,/^Csound$|^cs[0o]und[\W_ \t]?csd$/i], + ["csound-icon",["dark-blue","dark-blue"],/\.sco$/i,,false,,/\.csound-score$/i,/^Csound$|^cs[0o]und[\W_ \t]?sc[0o]$/i], + ["css3-icon",["medium-blue","medium-blue"],/\.css$/i,,false,/^css$/,/\.css$/i,/^css$/i], + ["css3-icon",["dark-blue","dark-blue"],/\.less$/i,,false,/^less$/,/\.less$/i,/^CSS$|^less$/i], + ["cucumber-icon",["medium-green","medium-green"],/\.feature$/i,,false,,/(?:^|\.)(?:gherkin\.feature|cucumber\.steps)(?:\.|$)/i,/^Cucumber$|^gherkin$/i], + ["nvidia-icon",["medium-green","medium-green"],/\.cu$/i,,false,,/\.cuda(?:-c\+\+)?$/i,/^CUDA$/i], + ["nvidia-icon",["dark-green","dark-green"],/\.cuh$/i], + ["cython-icon",["medium-orange","medium-orange"],/\.pyx$/i,,false,,/\.cython$/i,/^Cython$|^pyrex$/i], + ["cython-icon",["medium-blue","medium-blue"],/\.pxd$/i], + ["cython-icon",["dark-blue","dark-blue"],/\.pxi$/i], + ["dlang-icon",["medium-red","medium-red"],/\.di?$/i,,false,,/\.d$/i,/^D$/i], + ["yang-icon",["medium-red","medium-red"],/\.dnh$/i,,false,,/\.danmakufu$/i,/^Danmakufu$/i], + ["darcs-icon",["medium-green","medium-green"],/\.d(?:arcs)?patch$/i], + ["dart-icon",["medium-cyan","medium-cyan"],/\.dart$/i,,false,/^dart$/,/\.dart$/i,/^Dart$/i], + ["dashboard-icon",["medium-orange","medium-orange"],/\.s[kl]im$/i,,false,/^slim$/,/\.slim$/i,/^slim$/i], + ["dashboard-icon",["medium-green","medium-green"],/\.cpuprofile$/i], + ["database-icon",["medium-yellow","medium-yellow"],/\.(?:h|geo|topo)?json$/i], + ["database-icon",["light-red","light-red"],/\.ya?ml$/i], + ["database-icon",["medium-maroon","medium-maroon"],/\.cson$|\.ston$|^mime\.types$/i], + ["database-icon",["dark-yellow","dark-yellow"],/\.json5$/i,,false,/^json5$/,/\.json5$/i,/^js[0o]n5$/i], + ["database-icon",["medium-red","medium-red"],/\.http$|\.pot?$/i], + ["database-icon",["medium-orange","medium-orange"],/\.ndjson$|\.pytb$/i,,false,,/\.python\.traceback$/i], + ["database-icon",["light-blue","light-blue"],/\.fea$/i,,false,,/\.opentype$/i,/^afdk[0o]$/i], + ["database-icon",["medium-purple","medium-purple"],/\.json\.eex$|\.edn$/i], + ["database-icon",["dark-cyan","dark-cyan"],/\.proto$/i,,false,,/\.protobuf$/i,/^(?:protobuf|Protocol\s*Buffers?)$/i], + ["database-icon",["dark-blue","dark-blue"],/\.pydeps$|\.rviz$/i], + ["database-icon",["dark-purple","dark-purple"],/\.eam\.fs$/i], + ["database-icon",["medium-pink","medium-pink"],/\.qml$/i], + ["database-icon",["dark-pink","dark-pink"],/\.qbs$/i], + ["database-icon",["medium-cyan","medium-cyan"],/\.ttl$/i,,false,,/\.turtle$/i], + ["database-icon",["medium-blue","medium-blue"],/\.syntax$/i], + ["database-icon",["dark-red","dark-red"],/[\/\\](?:magic[\/\\]Magdir|file[\/\\]magic)[\/\\][-.\w]+$|lib[\\\/]icons[\\\/]\.icondb\.js$/i,,true], + ["dbase-icon",["medium-red","medium-red"],/\.dbf$/i], + ["debian-icon",["medium-red","medium-red"],/\.deb$/i], + ["debian-icon",["dark-cyan","dark-cyan"],/^control$/], + ["debian-icon",["medium-cyan","medium-cyan"],/^rules$/], + ["diff-icon",["medium-orange","medium-orange"],/\.diff$/i,,false,,/\.diff$/i,/^Diff$|^udiff$/i], + ["earth-icon",["medium-blue","medium-blue"],/\.zone$/i], + ["earth-icon",["medium-green","medium-green"],/\.arpa$/i], + ["earth-icon",["dark-blue","dark-blue"],/^CNAME$/], + ["doxygen-icon",["medium-blue","medium-blue"],/^Doxyfile$/,,false,,/\.doxygen$/i,/^Doxyfile$/i], + ["dyalog-icon",["medium-orange","medium-orange"],/\.dyalog$/i,,false,/^dyalog$/], + ["dylib-icon",["medium-cyan","medium-cyan"],/\.(?:dylib|bundle)$/i], + ["e-icon",["medium-green","medium-green"],/\.E$/,,false,/^rune$/], + ["eagle-icon",["medium-red","medium-red"],/\.sch$/i], + ["eagle-icon",["dark-red","dark-red"],/\.brd$/i], + ["ec-icon",["dark-blue","dark-blue"],/\.ec$/i,,false,/^ec$/,/\.ec$/i,/^ec$/i], + ["ec-icon",["dark-purple","dark-purple"],/\.eh$/i], + ["ecere-icon",["medium-blue","medium-blue"],/\.epj$/i], + ["eclipse-icon",["dark-blue","dark-blue"],/\.c?project$/], + ["eclipse-icon",["medium-red","medium-red"],/\.classpath$/i], + ["editorconfig-icon",["medium-orange","medium-orange"],/\.editorconfig$/i,,false,,/\.editorconfig$/i,/^EditorConfig$/i], + ["eiffel-icon",["medium-cyan","medium-cyan"],/\.e$/,,false,,/\.eiffel$/i,/^Eiffel$/i], + ["elixir-icon",["dark-purple","dark-purple"],/\.ex$/i,,false,/^elixir$/,/\.elixir$/i,/^elixir$/i], + ["elixir-icon",["medium-purple","medium-purple"],/\.(?:exs|eex)$/i], + ["elixir-icon",["light-purple","light-purple"],/mix\.exs?$/i], + ["elm-icon",["medium-blue","medium-blue"],/\.elm$/i,,false,,/\.elm$/i,/^Elm$/i], + ["emacs-icon",["medium-purple","medium-purple"],/(?:^|\.)(?:el|_?emacs|spacemacs|emacs\.desktop|abbrev[-_]defs)$/i,,false,/^emacs$/,/\.emacs\.lisp$/i,/^Emacs Lisp$|^elisp$/i], + ["emacs-icon",["dark-purple","dark-purple"],/(?:^|\.)(?:elc|eld)$/i,,false,,,,/^;ELC\x17\0{3}/], + ["at-icon",["medium-red","dark-red"],/^(?:authors|owners)$/i], + ["em-icon",["medium-red","medium-red"],/\.emberscript$/i,,false,,/\.ember(?:script)?$/i,/^EmberScript$/i], + ["mustache-icon",["medium-blue","medium-blue"],/\.em(?:blem)?$/i,,false,,/\.emblem$/i,/^Emblem$/i], + ["eq-icon",["medium-orange","medium-orange"],/\.eq$/i,,false,,/\.eq$/i,/^EQ$/i], + ["erlang-icon",["medium-red","medium-red"],/\.erl$/i,,false,/^escript$/,/\.erlang$/i,/^Erlang$/i], + ["erlang-icon",["dark-red","dark-red"],/\.beam$/i], + ["erlang-icon",["medium-maroon","medium-maroon"],/\.hrl$/i], + ["erlang-icon",["medium-green","medium-green"],/\.xrl$/i], + ["erlang-icon",["dark-green","dark-green"],/\.yrl$/i], + ["erlang-icon",["dark-maroon","dark-maroon"],/\.app\.src$/i], + ["factor-icon",["medium-orange","medium-orange"],/\.factor$/i,,false,,/\.factor$/i,/^Factor$/i], + ["factor-icon",["dark-orange","dark-orange"],/\.factor-rc$/i], + ["factor-icon",["medium-red","medium-red"],/\.factor-boot-rc$/i], + ["fancy-icon",["dark-blue","dark-blue"],/\.fy$/i,,false,/^fancy$/,/\.fancy$/i,/^fancy$/i], + ["fancy-icon",["medium-blue","medium-blue"],/\.fancypack$/i], + ["fancy-icon",["medium-green","medium-green"],/^Fakefile$/], + ["fantom-icon",["medium-blue","medium-blue"],/\.fan$/i,,false,,/\.fan(?:tom)?$/i,/^Fantom$/i], + ["fbx-icon",["medium-maroon","medium-maroon"],/\.fbx$/i], + ["finder-icon",["medium-blue","medium-blue"],/^Icon\r$/], + ["finder-icon",["dark-blue","dark-blue"],/\.rsrc$/i], + ["flow-icon",["medium-orange","medium-orange"],/\.(?:flowconfig|js\.flow)$/i], + ["flux-icon",["medium-blue","medium-blue"],/\.fx$/i], + ["flux-icon",["dark-blue","dark-blue"],/\.flux$/i], + ["font-icon",["dark-blue","dark-blue"],/\.woff2$/i,,false,,,,/^wOF2/], + ["font-icon",["medium-blue","medium-blue"],/\.woff$/i,,false,,,,/^wOFF/], + ["font-icon",["light-green","light-green"],/\.eot$/i,,false,,,,/^.{34}LP/], + ["font-icon",["dark-green","dark-green"],/\.ttc$/i,,false,,,,/^ttcf/], + ["font-icon",["medium-green","medium-green"],/\.ttf$/i,,false,,,,/^\0\x01\0{3}/], + ["font-icon",["dark-yellow","dark-yellow"],/\.otf$/i,,false,,,,/^OTTO.*\0/], + ["font-icon",["dark-red","dark-red"],/\.pfb$/i], + ["font-icon",["medium-red","medium-red"],/\.pfm$/i], + ["ff-icon",["medium-orange","medium-orange"],/\.pe$/i,,false,/^fontforge$/,/\.source\.fontforge$/i,/^FontForge$|^pfaedit$/i], + ["ff-icon",["dark-blue","dark-blue"],/\.sfd$/i,,false,,/\.text\.sfd$/i,/^FontForge$/i], + ["fortran-icon",["medium-maroon","medium-maroon"],/\.f$/i,,false,,/\.fortran\.?(?:modern|punchcard)?$/i,/^Fortran$/i], + ["fortran-icon",["medium-green","medium-green"],/\.f90$/i,,false,,/\.fortran\.free$/i,/^Fortran$/i], + ["fortran-icon",["medium-red","medium-red"],/\.f03$/i], + ["fortran-icon",["medium-blue","medium-blue"],/\.f08$/i], + ["fortran-icon",["medium-maroon","medium-maroon"],/\.f77$/i,,false,,/\.fortran\.fixed$/i,/^Fortran$/i], + ["fortran-icon",["dark-pink","dark-pink"],/\.f95$/i], + ["fortran-icon",["dark-cyan","dark-cyan"],/\.for$/i], + ["fortran-icon",["dark-yellow","dark-yellow"],/\.fpp$/i], + ["freemarker-icon",["medium-blue","medium-blue"],/\.ftl$/i,,false,,/\.ftl$/i,/^FreeMarker$|^ftl$/i], + ["frege-icon",["dark-red","dark-red"],/\.fr$/i], + ["fsharp-icon",["medium-blue","medium-blue"],/\.fs[xi]?$/i,,false,,/\.fsharp$/i,/^FSharp$|^f#$/i], + ["gml-icon",["medium-green","medium-green"],/\.gml$/i], + ["gams-icon",["dark-red","dark-red"],/\.gms$/i,,false,,/\.gams(?:-lst)?$/i,/^GAMS$/i], + ["gap-icon",["medium-yellow","dark-yellow"],/\.gap$/i,,false,/^gap$/,/\.gap$/i,/^gap$/i], + ["gap-icon",["dark-blue","dark-blue"],/\.gi$/i], + ["gap-icon",["medium-orange","medium-orange"],/\.tst$/i], + ["gdb-icon",["medium-green","dark-green"],/\.gdb$/i,,false,/^gdb$/,/\.gdb$/i,/^gdb$/i], + ["gdb-icon",["medium-cyan","dark-cyan"],/gdbinit$/i], + ["godot-icon",["medium-blue","medium-blue"],/\.gd$/i,,false,,/\.gdscript$/i,/^GDScript$/i], + ["gear-icon",["medium-red","medium-red"],/^\.htaccess$|\.yardopts$/i], + ["gear-icon",["medium-orange","medium-orange"],/^\.htpasswd$/i], + ["gear-icon",["dark-green","dark-green"],/^\.env\.|\.pairs$/i], + ["gear-icon",["dark-yellow","dark-yellow"],/^\.lesshintrc$/i], + ["gear-icon",["medium-yellow","medium-yellow"],/^\.csscomb\.json$|\.csslintrc$|\.jsbeautifyrc$|\.jshintrc$|\.jscsrc$/i], + ["gear-icon",["medium-maroon","medium-maroon"],/\.coffeelintignore$|\.codoopts$/i], + ["gear-icon",["medium-blue","medium-blue"],/\.module$/i], + ["gear-icon",["dark-blue","dark-blue"],/\.arcconfig$|\.python-version$/i], + ["gear-icon",["dark-orange","dark-orange"],/\.lintstagedrc$/i], + ["gears-icon",["dark-orange","dark-orange"],/\.dll$/i,,false,,,,/^PMOCCMOC/], + ["code-icon",["medium-blue","medium-blue"],/\.xml$|\.config$|\.4th$|\.cocci$|\.dyl$|\.dylan$|\.ecl$|\.forth$|\.launch$|\.manifest$|\.menu$|\.srdf$|\.st$|\.ui$|\.wsf$|\.x3d$|\.xaml$/i,,false,,,,/^<\?xml /], + ["code-icon",["dark-red","dark-red"],/\.rdf$|\.capnp$|\.dotsettings$|\.flex$|\.fsh$|\.fsproj$|\.prw$|\.xproj$/i,,false,,/\.capnp$/i], + ["code-icon",["medium-blue","medium-blue"],/^_service$/], + ["code-icon",["medium-red","medium-red"],/^configure\.ac$|\.ML$/], + ["code-icon",["medium-green","medium-green"],/^Settings\.StyleCop$/], + ["code-icon",["medium-green","medium-green"],/\.abnf$|\.ditaval$|\.storyboard$|\.xmi$|\.yacc$/i,,false,/^abnf$/,/\.abnf$/i,/^abnf$/i], + ["code-icon",["medium-purple","medium-purple"],/\.aepx$|\.dita$|\.grace$|\.lid$|\.nproj$/i], + ["code-icon",["dark-cyan","dark-cyan"],/\.agda$|\.plist$|\.wisp$|\.xlf$|\.xslt$/i,,false,,/\.plist$/i], + ["code-icon",["medium-orange","medium-orange"],/\.appxmanifest$|\.befunge$|\.fun$|\.muf$|\.xul$/i], + ["code-icon",["medium-cyan","medium-cyan"],/\.ash$|\.asn1?$|\.lagda$|\.lex$|\.props$|\.resx$|\.smt2$|\.vsh$|\.xsl$|\.yy$/i,,false,/^xsl$/,/\.xsl$/i], + ["code-icon",["dark-blue","dark-blue"],/\.axml$|\.bmx$|\.brs$|\.ccxml$|\.clixml$|\.fth$|\.intr$|\.mdpolicy$|\.mtml$|\.myt$|\.xsd$/i,,false,/^brightscript$/,/\.brightscript$/i], + ["code-icon",["medium-maroon","medium-maroon"],/\.bnf$|\.cbl$|\.cob$|\.cobol$|\.fxml$/i,,false,/^bnf$/,/\.bnf$/i,/^bnf$/i], + ["code-icon",["dark-maroon","dark-maroon"],/\.ccp$|\.cpy$|\.mxml$/i], + ["code-icon",["medium-red","medium-red"],/\.ch$|\.cw$|\.ebnf$|\.iml$|\.jflex$|\.m4$|\.mask$|\.mumps$|\.prg$|\.pt$|\.rl$|\.sml$|\.targets$|\.webidl$|\.wsdl$|\.xacro$|\.xliff$/i,,false,/^ebnf$/,/\.ebnf$/i], + ["code-icon",["dark-pink","dark-pink"],/\.ct$|\.zcml$/i], + ["code-icon",["dark-green","dark-green"],/\.cy$|\.eclxml$|\.ivy$|\.sed$|\.tml$|\.y$/i], + ["code-icon",["dark-purple","dark-purple"],/\.ditamap$|\.frt$|\.lp$|\.omgrofl$|\.osm$|\.wxs$|\.xib$/i], + ["code-icon",["medium-pink","medium-pink"],/\.filters$|\.lol$|\.pig$/i], + ["code-icon",["dark-orange","dark-orange"],/\.grxml$|\.urdf$/i], + ["code-icon",["medium-yellow","medium-yellow"],/\.jelly$/i], + ["code-icon",["dark-yellow","dark-yellow"],/\.jsproj$|\.ohm$|\.sgml?$/i,,false,/^ohm$/,/\.ohm$/i], + ["code-icon",["dark-blue","dark-blue"],/\.mq[45h]$/i,,false,,/(?:^|\.)mq[45](?=\.|$)/i], + ["code-icon",["light-green","light-green"],/\.odd$/i], + ["code-icon",["light-blue","light-blue"],/\.psc1$|\.smt$/i,,false,/boolector|cvc4|mathsat5|opensmt|smtinterpol|smt-rat|stp|verit|yices2|z3/,/\.smt$/i], + ["code-icon",["light-cyan","light-cyan"],/\.scxml$/i], + ["code-icon",["light-maroon","light-maroon"],/\.sig$|\.wxl$/i], + ["code-icon",["light-orange","light-orange"],/\.ux$|\.wxi$/i], + ["code-icon",["light-purple","light-purple"],/\.vxml$/i], + ["genshi-icon",["medium-red","medium-red"],/\.kid$/i,,false,,/\.genshi$/i,/^Genshi$|^xml\+(?:genshi|kid)$/i], + ["gentoo-icon",["dark-cyan","dark-cyan"],/\.ebuild$/i,,false,,/\.ebuild$/i,/^Gentoo$/i], + ["gentoo-icon",["medium-blue","medium-blue"],/\.eclass$/i], + ["git-icon",["medium-red","medium-red"],/^\.git|^\.keep$|\.mailmap$/i,,false,,/\.git-(?:commit|config|rebase)$/i,/^Git$/i], + ["git-commit-icon",["medium-red","medium-red"],/^COMMIT_EDITMSG$/], + ["git-merge-icon",["medium-red","medium-red"],/^MERGE_(?:HEAD|MODE|MSG)$/], + ["glade-icon",["medium-green","medium-green"],/\.glade$/i], + ["pointwise-icon",["medium-blue","medium-blue"],/\.glf$/i], + ["glyphs-icon",["medium-green","medium-green"],/\.glyphs$/i], + ["gn-icon",["dark-blue","dark-blue"],/\.gn$/i,,false,/^gn$/,/\.gn$/i,/^gn$/i], + ["gn-icon",["medium-blue","medium-blue"],/\.gni$/i], + ["gnu-icon",["medium-red","dark-red"],/\.(?:gnu|gplv[23])$/i], + ["graph-icon",["medium-red","medium-red"],/\.(?:gp|plo?t|gnuplot)$/i,,false,/^gnuplot$/,/\.gnuplot$/i,/^Gnuplot$/i], + ["go-icon",["medium-blue","medium-blue"],/\.go$/i,,false,,/\.go(?:template)?$/i,/^Go$/i], + ["golo-icon",["medium-orange","medium-orange"],/\.golo$/i,,false,,/\.golo$/i,/^Golo$/i], + ["gosu-icon",["medium-blue","medium-blue"],/\.gs$/i,,false,,/\.gosu(?:\.\d+)?$/i,/^Gosu$/i], + ["gosu-icon",["medium-green","medium-green"],/\.gst$/i], + ["gosu-icon",["dark-green","dark-green"],/\.gsx$/i], + ["gosu-icon",["dark-blue","dark-blue"],/\.vark$/i], + ["gradle-icon",["medium-blue","medium-blue"],/\.gradle$/i,,false,,/\.gradle$/i,/^Gradle$/i], + ["gradle-icon",["dark-purple","dark-purple"],/gradlew$/i], + ["gf-icon",["medium-red","medium-red"],/\.gf$/i], + ["graphql-icon",["medium-pink","medium-pink"],/\.graphql$/i,,false,,/\.graphql$/i,/^GraphQL$/i], + ["graphql-icon",["medium-purple","medium-purple"],/\.gql$/i], + ["graphviz-icon",["medium-blue","medium-blue"],/\.gv$/i,,false,,/\.dot$/i,/^Graphviz$/i], + ["graphviz-icon",["dark-cyan","dark-cyan"],/\.dot$/i], + ["groovy-icon",["light-blue","light-blue"],/\.(?:groovy|grt|gtpl|gsp|gvy)$/i,,false,/^groovy$/,/\.groovy$/i,/^Groovy$|^gsp$/i], + ["hack-icon",["medium-orange","medium-orange"],/\.hh$/i,,false,,/\.hack$/i,/^Hack$/i], + ["haml-icon",["medium-yellow","medium-yellow"],/\.haml$/i,,false,/^haml$/,/\.haml$/i,/^haml$/i], + ["haml-icon",["medium-maroon","medium-maroon"],/\.hamlc$/i,,false,/^hamlc$/,/\.hamlc$/i,/^Haml$|^hamlc$/i], + ["harbour-icon",["dark-blue","dark-blue"],/\.hb$/i,,false,,/\.harbour$/i,/^Harbour$/i], + ["hashicorp-icon",["dark-purple","dark-purple"],/\.hcl$/i,,false,,/(?:^|\.)(?:hcl|hashicorp)(?:\.|$)/i,/^Hashicorp Configuration Language$/i], + ["haskell-icon",["medium-purple","medium-purple"],/\.hs$/i,,false,/^runhaskell$/,/\.source\.haskell$/i,/^Haskell$/i], + ["haskell-icon",["medium-blue","medium-blue"],/\.hsc$/i,,false,,/\.hsc2hs$/i,/^Haskell$/i], + ["haskell-icon",["dark-purple","dark-purple"],/\.c2hs$/i,,false,,/\.c2hs$/i,/^Haskell$|^C2hs(?:\s*Haskell)?$/i], + ["haskell-icon",["dark-blue","dark-blue"],/\.lhs$/i,,false,,/\.latex\.haskell$/i,/^Haskell$|^(?:lhaskell|lhs|Literate\s*Haskell)$/i], + ["haxe-icon",["medium-orange","medium-orange"],/\.hx(?:[sm]l|)?$/,,false,,/(?:^|\.)haxe(?:\.\d+)?$/i,/^Haxe$/i], + ["heroku-icon",["medium-purple","medium-purple"],/^Procfile$/], + ["heroku-icon",["light-purple","light-purple"],/\.buildpacks$/i], + ["heroku-icon",["dark-purple","dark-purple"],/^\.vendor_urls$/], + ["html5-icon",["medium-orange","medium-orange"],/\.x?html?$/i,,false,,/\.html\.basic$/i,/^HTML$|^(?:xhtml|htm)$/i], + ["html5-icon",["medium-red","medium-red"],/\.cshtml$|\.latte$/i,,false,/^latte$/,/\.latte$/i], + ["html5-icon",["medium-green","medium-green"],/\.ejs$|\.kit$|\.swig$/i,,false,/^swig$/,/\.swig$/i], + ["html5-icon",["dark-blue","dark-blue"],/\.gohtml$|\.phtml$/i,,false,/^gohtml$/,/\.gohtml$/i,/^HTML$|^g[0o]html$/i], + ["html5-icon",["medium-purple","medium-purple"],/\.html\.eex$|\.jsp$/i,,false,,/\.jsp$/i], + ["html5-icon",["medium-cyan","medium-cyan"],/\.shtml$/i], + ["html5-icon",["dark-red","dark-red"],/\.scaml$/i,,false,/^scaml$/,/\.scaml$/i,/^HTML$|^scaml$/i], + ["html5-icon",["medium-red","medium-red"],/\.vash$/i,,false,/^vash$/,/\.vash$/i,/^HTML$|^vash$/i], + ["html5-icon",["medium-blue","medium-blue"],/\.dtml$/i,,false,/^dtml$/,/\.dtml$/i,/^HTML$|^dtml$/i], + ["hy-icon",["dark-blue","dark-blue"],/\.hy$/i,,false,,/\.hy$/i,/^Hy$|^hylang$/i], + ["idl-icon",["medium-blue","medium-blue"],/\.dlm$/i,,false,,/\.idl$/i,/^IDL$/i], + ["idris-icon",["dark-red","dark-red"],/\.idr$/i,,false,,/\.(?:idris|ipkg)$/i,/^Idris$/i], + ["idris-icon",["medium-maroon","medium-maroon"],/\.lidr$/i], + ["igorpro-icon",["dark-red","dark-red"],/\.ipf$/i], + ["image-icon",["medium-orange","medium-orange"],/\.a?png$|\.svgz$/i,,false,,,,/^.PNG\r\n\x1A\n/], + ["image-icon",["medium-yellow","medium-yellow"],/\.gif$|\.ora$|\.sgi$/i,,false,,,,/^GIF8[97]a/], + ["image-icon",["medium-green","medium-green"],/\.jpg$/i,,false,,,,/^\xFF\xD8\xFF[\xDB\xE0\xE1]|(?:JFIF|Exif)\0|^\xCF\x84\x01|^\xFF\xD8.+\xFF\xD9$/], + ["image-icon",["medium-blue","medium-blue"],/\.ico$/i,,false,,,,/^\0{2}\x01\0/], + ["image-icon",["dark-blue","dark-blue"],/\.webp$|\.iff$|\.lbm$|\.liff$|\.nrrd$|\.pcx$|\.vsdx?$/i,,false,,,,/^RIFF.{4}WEBPVP8/], + ["image-icon",["medium-red","medium-red"],/\.bmp$/i,,false,,,,/^BM/], + ["image-icon",["medium-red","medium-red"],/\.bpg$/i,,false,,,,/^BPG\xFB/], + ["image-icon",["medium-orange","medium-orange"],/\.cin$/i,,false,,,,/^\x80\x2A\x5F\xD7/], + ["image-icon",["dark-green","dark-green"],/\.cd5$/i,,false,,,,/^_CD5\x10\0/], + ["image-icon",["light-yellow","light-yellow"],/\.cpc$/i], + ["image-icon",["medium-orange","medium-orange"],/\.cr2$/i,,false,,,,/^II\*\0\x10\0{3}CR/], + ["image-icon",["medium-pink","medium-pink"],/\.dcm$|\.mpo$|\.pbm$/i,,false,,,,/^.{128}DICM/], + ["image-icon",["dark-green","dark-green"],/\.dds$/i,,false,,,,/^DDS \|\0{3}/], + ["image-icon",["medium-purple","medium-purple"],/\.djvu?$|\.pxr$/i,,false,,,,/^AT&TFORM/], + ["image-icon",["dark-orange","dark-orange"],/\.dpx$|\.raw$/i,,false,,,,/^(?:SDPX|XPDS)/], + ["image-icon",["light-blue","light-blue"],/\.ecw$|\.sct$/i], + ["image-icon",["dark-yellow","dark-yellow"],/\.exr$/i,,false,,,,/^v\/1\x01/], + ["image-icon",["medium-cyan","medium-cyan"],/\.fits?$|\.fts$/i,,false,,,,/^SIMPLE =/], + ["image-icon",["dark-red","dark-red"],/\.flif$|\.hdp$|\.heic$|\.heif$|\.jxr$|\.wdp$/i,,false,,,,/^FLIF/], + ["image-icon",["medium-blue","medium-blue"],/\.hdr$/i,,false,,,,/^#\?RADIANCE\n/], + ["image-icon",["medium-pink","medium-pink"],/\.icns$/i,,false,,,,/^icns/], + ["image-icon",["dark-green","dark-green"],/\.(?:jp[f2xm]|j2c|mj2)$/i,,false,,,,/^\0{3}\fjP {2}/], + ["image-icon",["dark-cyan","dark-cyan"],/\.jps$/i], + ["image-icon",["medium-orange","medium-orange"],/\.mng$/i,,false,,,,/^.MNG\r\n\x1A\n/], + ["image-icon",["light-red","light-red"],/\.pgf$/i], + ["image-icon",["light-purple","light-purple"],/\.pict$/i], + ["image-icon",["dark-orange","dark-orange"],/\.tga$/i,,false,,,,/TRUEVISION-XFILE\.\0$/], + ["image-icon",["medium-red","medium-red"],/\.tiff?$/i,,false,,,,/^II\x2A\0|^MM\0\x2A/], + ["image-icon",["dark-maroon","dark-maroon"],/\.wbm$/i], + ["inform7-icon",["medium-blue","medium-blue"],/\.ni$/i,,false,,/\.inform-?7?$/i,/^Inform 7$|^i7$/i], + ["inform7-icon",["dark-blue","dark-blue"],/\.i7x$/i], + ["inno-icon",["dark-blue","dark-blue"],/\.iss$/i,,false,,/\.inno$/i,/^Inno Setup$/i], + ["io-icon",["dark-purple","dark-purple"],/\.io$/i,,false,/^io$/,/^source\.io$/i,/^Io$/i], + ["ioke-icon",["medium-red","medium-red"],/\.ik$/i,,false,/^ioke$/], + ["isabelle-icon",["dark-red","dark-red"],/\.thy$/i,,false,,/\.isabelle\.theory$/i,/^Isabelle$/i], + ["isabelle-icon",["dark-blue","dark-blue"],/^ROOT$/], + ["j-icon",["light-blue","light-blue"],/\.ijs$/i,,false,/^jconsole$/,/\.j$/i,/^J$/i], + ["jade-icon",["medium-red","medium-red"],/\.jade$/i,,false,,/\.jade$/i,/^Jade$/i], + ["jake-icon",["medium-maroon","dark-maroon"],/^Jakefile$/], + ["jake-icon",["medium-yellow","dark-yellow"],/\.jake$/i], + ["java-icon",["medium-purple","medium-purple"],/\.java$/i,,false,,/\.java$/i,/^Java$/i], + ["js-icon",["medium-yellow","dark-yellow"],/\.js$|\.es6$|\.es$/i,,false,/^(?:node|iojs)$/,/\.js$/i,/^JavaScript$|^(?:js|node)$/i], + ["js-icon",["medium-orange","dark-orange"],/\._js$/i], + ["js-icon",["medium-maroon","dark-maroon"],/\.jsb$|\.dust$/i], + ["js-icon",["medium-blue","dark-blue"],/\.jsm$|\.mjs$|\.xsjslib$/i], + ["js-icon",["medium-green","dark-green"],/\.jss$/i], + ["js-icon",["medium-pink","dark-pink"],/\.sjs$/i], + ["js-icon",["medium-red","dark-red"],/\.ssjs$/i], + ["js-icon",["medium-purple","dark-purple"],/\.xsjs$/i], + ["jenkins-icon",["medium-red","dark-red"],/^Jenkinsfile$/], + ["jinja-icon",["dark-red","dark-red"],/\.jinja$/i,,false,,/\.jinja$/i,/^Jinja$|^(?:django|htmldjango|html\+django\/jinja|html\+jinja)$/i], + ["jinja-icon",["medium-red","medium-red"],/\.jinja2$/i], + ["jsonld-icon",["medium-blue","medium-blue"],/\.jsonld$/i], + ["sql-icon",["medium-blue","medium-blue"],/\.jq$/i,,false,,/\.jq$/i,/^JSONiq$/i], + ["jsx-icon",["medium-blue","dark-blue"],/\.jsx$/i,,false,,/\.jsx$/i,/^JSX$/i], + ["julia-icon",["medium-purple","medium-purple"],/\.jl$/i,,false,,/\.julia$/i,/^Julia$/i], + ["jupyter-icon",["dark-orange","dark-orange"],/\.ipynb$/i,,false,,/\.ipynb$/i,/^(?:ipynb|(?:Jupyter|IPython)\s*Notebook)$/i], + ["jupyter-icon",["dark-cyan","dark-cyan"],/^Notebook$/], + ["keynote-icon",["medium-blue","medium-blue"],/\.keynote$/i], + ["keynote-icon",["dark-blue","dark-blue"],/\.knt$/i], + ["kivy-icon",["dark-maroon","dark-maroon"],/\.kv$/i,,false,,/\.kv$/i,/^Kivy$/i], + ["earth-icon",["medium-green","medium-green"],/\.kml$/i], + ["kotlin-icon",["dark-blue","dark-blue"],/\.kt$/i,,false,/^kotlin$/,/\.kotlin$/i,/^k[0o]tlin$/i], + ["kotlin-icon",["medium-blue","medium-blue"],/\.ktm$/i], + ["kotlin-icon",["medium-orange","medium-orange"],/\.kts$/i], + ["krl-icon",["medium-blue","medium-blue"],/\.krl$/i,,false,,/\.krl$/i,/^KRL$/i], + ["labview-icon",["dark-blue","dark-blue"],/\.lvproj$/i], + ["laravel-icon",["medium-orange","medium-orange"],/\.blade\.php$/i,,false,,/\.php\.blade$/i,/^Laravel$/i], + ["lasso-icon",["dark-blue","dark-blue"],/\.lasso$|\.las$/i,,false,,/\.lasso$/i,/^Lasso$|^lass[0o]script$/i], + ["lasso-icon",["medium-blue","medium-blue"],/\.lasso8$/i], + ["lasso-icon",["medium-purple","medium-purple"],/\.lasso9$/i], + ["lasso-icon",["medium-red","medium-red"],/\.ldml$/i], + ["lean-icon",["dark-purple","dark-purple"],/\.lean$/i,,false,/^lean$/,/\.lean$/i,/^lean$/i], + ["lean-icon",["dark-red","dark-red"],/\.hlean$/i], + ["lfe-icon",["dark-red","dark-red"],/\.lfe$/i], + ["lightwave-icon",["medium-red","medium-red"],/\.lwo$/i], + ["lightwave-icon",["medium-blue","medium-blue"],/\.lws$/i], + ["lisp-icon",["medium-red","medium-red"],/\.lsp$/i,,false,/^newlisp$/,/\.newlisp$/i,/^Lisp$|^newlisp$/i], + ["lisp-icon",["dark-red","dark-red"],/\.lisp$/i,,false,/^lisp$/,/\.lisp$/i,/^lisp$/i], + ["lisp-icon",["medium-maroon","medium-maroon"],/\.l$|\.nl$/i,,false,/picolisp|pil/], + ["lisp-icon",["medium-blue","medium-blue"],/\.ny$|\.sexp$/i], + ["lisp-icon",["medium-purple","medium-purple"],/\.podsl$/i], + ["ls-icon",["medium-blue","medium-blue"],/\.ls$/i,,false,,/\.livescript$/i,/^LiveScript$|^(?:ls|live-script)$/i], + ["ls-icon",["dark-blue","dark-blue"],/\._ls$/i], + ["ls-icon",["medium-green","medium-green"],/^Slakefile$/], + ["llvm-icon",["dark-green","dark-green"],/\.ll$/i,,false,/^llvm$/,/\.llvm$/i,/^llvm$/i], + ["llvm-icon",["medium-yellow","dark-yellow"],/\.clang-format$/i], + ["mobile-icon",["dark-blue","dark-blue"],/\.xm$/i,,false,/^logos$/,/\.logos$/i,/^l[0o]g[0o]s$/i], + ["mobile-icon",["dark-red","dark-red"],/\.xi$/i], + ["logtalk-icon",["medium-red","medium-red"],/\.(?:logtalk|lgt)$/i,,false,,/\.logtalk$/i,/^Logtalk$/i], + ["lookml-icon",["medium-purple","medium-purple"],/\.lookml$/i], + ["lsl-icon",["medium-cyan","medium-cyan"],/\.lsl$/i,,false,/^lsl$/,/\.lsl$/i,/^lsl$/i], + ["lsl-icon",["dark-cyan","dark-cyan"],/\.lslp$/i], + ["lua-icon",["medium-blue","medium-blue"],/\.lua$/i,,false,/^lua$/,/\.lua$/i,/^lua$/i], + ["lua-icon",["dark-blue","dark-blue"],/\.pd_lua$/i], + ["lua-icon",["dark-purple","dark-purple"],/\.rbxs$/i], + ["lua-icon",["dark-red","dark-red"],/\.wlua$/i], + ["checklist-icon",["medium-yellow","medium-yellow"],/^Makefile|^makefile$/,,false,/^make$/,/\.makefile$/i,/^Makefile$|^(?:bsdmake|make|mf)$/i], + ["checklist-icon",["medium-yellow","medium-yellow"],/\.(?:mk|mak|make)$|^mkfile$/i], + ["checklist-icon",["medium-red","medium-red"],/^BSDmakefile$|\.am$/i], + ["checklist-icon",["medium-green","medium-green"],/^GNUmakefile$/i], + ["checklist-icon",["medium-blue","medium-blue"],/^Kbuild$/], + ["checklist-icon",["dark-blue","dark-blue"],/\.bb$/i], + ["checklist-icon",["dark-blue","dark-blue"],/^DEPS$/], + ["checklist-icon",["medium-blue","medium-blue"],/\.mms$/i], + ["checklist-icon",["light-blue","light-blue"],/\.mmk$/i], + ["checklist-icon",["dark-purple","dark-purple"],/\.pri$/i], + ["mako-icon",["dark-blue","dark-blue"],/\.mak?o$/i,,false,,/\.mako$/i,/^Mako$/i], + ["manpage-icon",["dark-green","dark-green"],/\.(?:1(?:[bcmsx]|has|in)?|[24568]|3(?:avl|bsm|3c|in|m|qt|x)?|7(?:d|fs|i|ipp|m|p)?|9[efps]?|chem|eqn|groff|man|mandoc|mdoc|me|mom|n|nroff|pic|tmac|tmac-u|tr|troff)$/i,,false,/man|mandoc|(?:[gnt]|dit)roff/i,/\.[gt]?roff$/i,/^Manual Page$|^(?:[gtn]?roff|manpage)$/i,/^\.TH[ \t]+(?:\S+)|^'\\" [tre]+(?=\s|$)/], + ["manpage-icon",["dark-maroon","dark-maroon"],/\.(?:rnh|rno|roff|run|runoff)$/i,,false,/^runoff$/,/\.runoff$/i,/^Manual Page$|^run[0o]ff$/i], + ["mapbox-icon",["medium-cyan","medium-cyan"],/\.mss$/i,,false,,/\.mss$/i,/^Mapbox$|^Carto(?:CSS)?$/i], + ["markdown-icon",["medium-blue","medium-blue"],/\.(?:md|mdown|markdown|mkd|mkdown|mkdn|rmd|ron)$/i,,false,,/\.gfm$/i,/^Markdown$/i], + ["mathematica-icon",["dark-red","dark-red"],/\.mathematica$|\.nbp$/i,,false,,/\.mathematica$/i,/^Mathematica$|^mma$/i], + ["mathematica-icon",["medium-red","medium-red"],/\.cdf$/i], + ["mathematica-icon",["medium-orange","medium-orange"],/\.ma$/i], + ["mathematica-icon",["medium-maroon","medium-maroon"],/\.mt$/i], + ["mathematica-icon",["dark-orange","dark-orange"],/\.nb$/i], + ["mathematica-icon",["medium-yellow","medium-yellow"],/\.wl$/i], + ["mathematica-icon",["dark-yellow","dark-yellow"],/\.wlt$/i], + ["matlab-icon",["medium-yellow","medium-yellow"],/\.matlab$/i,,false,,/\.(?:matlab|octave)$/i,/^MATLAB$|^[0o]ctave$/i], + ["max-icon",["dark-purple","dark-purple"],/\.maxpat$/i], + ["max-icon",["medium-red","medium-red"],/\.maxhelp$/i], + ["max-icon",["medium-blue","medium-blue"],/\.maxproj$/i], + ["max-icon",["medium-purple","medium-purple"],/\.mxt$/i], + ["max-icon",["medium-green","medium-green"],/\.pat$/i], + ["maxscript-icon",["dark-blue","dark-blue"],/\.ms$/i,,false,,/\.maxscript$/i,/^MAXScript$/i], + ["maxscript-icon",["dark-purple","dark-purple"],/\.mcr$/i], + ["maxscript-icon",["medium-red","medium-red"],/\.mce$/i], + ["maxscript-icon",["dark-cyan","dark-cyan"],/\.max$/i], + ["maxscript-icon",["medium-cyan","medium-cyan"],/\.3ds$/i], + ["maya-icon",["dark-cyan","dark-cyan"],/\.mb$/i], + ["maya-icon",["dark-blue","dark-blue"],/\.mel$/i], + ["maya-icon",["dark-purple","dark-purple"],/\.mcf[ip]$/i], + ["mediawiki-icon",["medium-yellow","medium-yellow"],/\.mediawiki$/i,,false,/^mediawiki$/,/\.mediawiki$/i,/^mediawiki$/i], + ["mediawiki-icon",["medium-orange","medium-orange"],/\.wiki$/i], + ["bullhorn-icon",["medium-orange","medium-orange"],/^\.mention-bot$/i], + ["mercury-icon",["medium-cyan","medium-cyan"],/\.moo$/i,,false,/^mmi$/,/\.mercury$/i,/^Mercury$/i], + ["metal-icon",["dark-cyan","dark-cyan"],/\.metal$/i], + ["access-icon",["dark-maroon","dark-maroon"],/\.accda$/i], + ["access-icon",["medium-maroon","medium-maroon"],/\.accdb$/i], + ["access-icon",["medium-green","medium-green"],/\.accde$/i], + ["access-icon",["medium-red","medium-red"],/\.accdr$/i], + ["access-icon",["dark-red","dark-red"],/\.accdt$/i], + ["access-icon",["light-maroon","light-maroon"],/\.adn$|\.laccdb$/i], + ["access-icon",["dark-purple","dark-purple"],/\.mdw$/i], + ["excel-icon",["dark-orange","dark-orange"],/\.xls$/i], + ["excel-icon",["dark-green","dark-green"],/\.xlsx$/i], + ["excel-icon",["medium-green","medium-green"],/\.xlsm$/i], + ["excel-icon",["medium-red","medium-red"],/\.xlsb$/i], + ["excel-icon",["dark-cyan","dark-cyan"],/\.xlt$/i], + ["onenote-icon",["dark-purple","dark-purple"],/\.one$/i], + ["powerpoint-icon",["dark-red","dark-red"],/\.pps$/i], + ["powerpoint-icon",["medium-orange","medium-orange"],/\.ppsx$/i], + ["powerpoint-icon",["dark-orange","dark-orange"],/\.ppt$/i], + ["powerpoint-icon",["medium-red","medium-red"],/\.pptx$/i], + ["powerpoint-icon",["medium-maroon","medium-maroon"],/\.potm$/i], + ["powerpoint-icon",["dark-green","dark-green"],/\.mpp$/i], + ["word-icon",["medium-blue","medium-blue"],/\.doc$/i], + ["word-icon",["dark-blue","dark-blue"],/\.docx$/i], + ["word-icon",["medium-maroon","medium-maroon"],/\.docm$/i], + ["word-icon",["dark-cyan","dark-cyan"],/\.docxml$/i], + ["word-icon",["dark-maroon","dark-maroon"],/\.dotm$/i], + ["word-icon",["medium-cyan","medium-cyan"],/\.dotx$/i], + ["word-icon",["medium-orange","medium-orange"],/\.wri$/i], + ["minecraft-icon",["dark-green","dark-green"],/^mcmod\.info$/i,,false,,/\.forge-config$/i,/^Minecraft$/i], + ["mirah-icon",["medium-blue","medium-blue"],/\.dr?uby$/g,,false,/^mirah$/,/\.mirah$/i,/^mirah$/i], + ["mirah-icon",["light-blue","light-blue"],/\.mir(?:ah)?$/g], + ["model-icon",["medium-red","medium-red"],/\.obj$/i,,false,,/\.wavefront\.obj$/i], + ["model-icon",["dark-blue","dark-blue"],/\.mtl$/i,,false,,/\.wavefront\.mtl$/i], + ["model-icon",["dark-green","dark-green"],/\.stl$/i], + ["model-icon",["medium-orange","medium-orange"],/\.u3d$/i], + ["circle-icon",["light-red","light-red"],/\.mo$/i,,false,,/\.modelica(?:script)?$/i,/^Modelica$/i], + ["modula2-icon",["medium-blue","medium-blue"],/\.mod$/i,,false,,/(?:^|\.)modula-?2(?:\.|$)/i,/^Modula-2$/i], + ["modula2-icon",["medium-green","medium-green"],/\.def$/i], + ["modula2-icon",["medium-red","medium-red"],/\.m2$/i], + ["monkey-icon",["medium-maroon","medium-maroon"],/\.monkey$/i,,false,,/\.monkey$/i,/^Monkey$/i], + ["moon-icon",["medium-yellow","medium-yellow"],/\.moon$/i,,false,/^moon$/,/\.moon$/i,/^MoonScript$/i], + ["mruby-icon",["medium-red","medium-red"],/\.mrb$/i,,false,/^mruby$/], + ["msql-icon",["medium-purple","medium-purple"],/\.dsql$/i], + ["mupad-icon",["medium-red","medium-red"],/\.mu$/i], + ["music-icon",["medium-orange","medium-orange"],/\.chord$/i], + ["music-icon",["dark-blue","dark-blue"],/\.midi?$/i,,false,,,,/^MThd/], + ["music-icon",["medium-green","medium-green"],/\.ly$/i,,false,,/\.(?:At)?lilypond-/i,/^Lily\s*Pond$/i], + ["music-icon",["dark-green","dark-green"],/\.ily$/i], + ["music-icon",["dark-red","dark-red"],/\.pd$/i], + ["mustache-icon",["medium-orange","medium-orange"],/\.(?:hbs|handlebars|mustache)$/i,,false,,/(?:^|\.)(?:mustache|handlebars)(?:\.|$)/i,/^Mustache$|^(?:hbs|htmlbars|handlebars)$/i], + ["nant-icon",["medium-orange","medium-orange"],/\.build$/i,,false,,/\.nant-build$/i,/^NAnt$/i], + ["earth-icon",["medium-green","medium-green"],/\.ncl$/i,,false,,/\.ncl$/i,/^NCAR Command Language \(NCL\)$/i], + ["neko-icon",["medium-orange","medium-orange"],/\.neko$/i,,false,/^neko$/,/\.neko$/i,/^nek[0o]$/i], + ["amx-icon",["medium-blue","medium-blue"],/\.axs$/i], + ["amx-icon",["dark-blue","dark-blue"],/\.axi$/i], + ["netlogo-icon",["medium-red","medium-red"],/\.nlogo$/i], + ["nginx-icon",["medium-green","medium-green"],/\.nginxconf$/i,,false,,/\.nginx$/i,/^NGINX$|^nginx[\W_ \t]?c[0o]nfigurati[0o]n[\W_ \t]?file$/i], + ["nib-icon",["dark-orange","dark-orange"],/\.nib$/i], + ["nimrod-icon",["medium-green","medium-green"],/\.nim(?:rod)?$/i,,false,,/\.nim$/i,/^Nimrod$/i], + ["shuriken-icon",["medium-blue","medium-blue"],/\.ninja$/i,,false,/^ninja$/,/\.ninja$/i,/^ninja$/i], + ["nit-icon",["dark-green","dark-green"],/\.nit$/i,,false,,/\.nit$/i,/^Nit$/i], + ["nix-icon",["medium-cyan","medium-cyan"],/\.nix$/i,,false,,/\.nix$/i,/^Nix$|^nix[0o]s$/i], + ["nmap-icon",["dark-blue","dark-blue"],/\.nse$/i,,false,,/\.nmap$/i,/^Nmap$/i], + ["node-icon",["medium-green","medium-green"],/\.njs$|\.nvmrc$/i], + ["node-icon",["dark-green","dark-green"],/\.node-version$/i], + ["nsis-icon",["medium-purple","medium-purple"],/\.nsi$/i,,false,/^nsis$/,/\.nsis$/i,/^nsis$/i], + ["nsis-icon",["dark-cyan","dark-cyan"],/\.nsh$/i], + ["recycle-icon",["light-green","light-green"],/\.nu$/i,,false,/^nush$/,/\.nu$/i,/^Nu$|^nush$/i], + ["recycle-icon",["dark-green","dark-green"],/^Nukefile$/], + ["nuget-icon",["medium-blue","medium-blue"],/\.nuspec$/i], + ["nuget-icon",["dark-purple","dark-purple"],/\.pkgproj$/i], + ["numpy-icon",["dark-blue","dark-blue"],/\.numpy$/i], + ["numpy-icon",["medium-blue","medium-blue"],/\.numpyw$/i], + ["numpy-icon",["medium-orange","medium-orange"],/\.numsc$/i], + ["nunjucks-icon",["dark-green","dark-green"],/\.(?:nunjucks|njk)$/i], + ["objc-icon",["medium-blue","medium-blue"],/\.mm?$/i,,false,,/\.objc(?:pp)?$/i,/^Objective-C$|^(?:Obj-?C|ObjectiveC)(?:\+\+)?$/i], + ["objc-icon",["dark-red","dark-red"],/\.pch$/i], + ["objc-icon",["dark-green","dark-green"],/\.x$/i], + ["objj-icon",["dark-orange","dark-orange"],/\.j$/i,,false,,/\.objj$/i,/^Objective-J$|^(?:Obj-?J|ObjectiveJ)$/i], + ["objj-icon",["dark-red","dark-red"],/\.sj$/i], + ["ocaml-icon",["medium-orange","medium-orange"],/\.ml$/i,,false,/ocaml(?:run|script)?/,/\.ocaml$/i,/^OCaml$/i], + ["ocaml-icon",["dark-orange","dark-orange"],/\.mli$/i], + ["ocaml-icon",["medium-red","medium-red"],/\.eliom$/i], + ["ocaml-icon",["dark-red","dark-red"],/\.eliomi$/i], + ["ocaml-icon",["medium-green","medium-green"],/\.ml4$/i], + ["ocaml-icon",["dark-green","dark-green"],/\.mll$/i,,false,/^ocamllex$/,/\.ocamllex$/i,/^OCaml$|^[0o]camllex$/i], + ["ocaml-icon",["dark-yellow","dark-yellow"],/\.mly$/i,,false,/^menhir$/,/\.menhir$/i,/^OCaml$|^menhir$/i], + ["ooc-icon",["medium-green","medium-green"],/\.ooc$/i,,false,,/\.ooc$/i,/^OOC$/i], + ["opa-icon",["medium-blue","medium-blue"],/\.opa$/i,,false,,/\.opa$/i,/^Opa$/i], + ["opencl-icon",["medium-red","medium-red"],/\.opencl$/i,,false,,/\.opencl$/i,/^OpenCL$/i], + ["progress-icon",["medium-red","medium-red"],/\.p$/i,,false,,/\.abl$/i,/^OpenEdge ABL$|^(?:progress|openedge|abl)$/i], + ["openoffice-icon",["medium-blue","medium-blue"],/\.odt$/i], + ["openoffice-icon",["dark-blue","dark-blue"],/\.ott$/i], + ["openoffice-icon",["dark-purple","dark-purple"],/\.fodt$/i], + ["openoffice-icon",["medium-green","medium-green"],/\.ods$/i], + ["openoffice-icon",["dark-green","dark-green"],/\.ots$/i], + ["openoffice-icon",["dark-cyan","dark-cyan"],/\.fods$/i], + ["openoffice-icon",["medium-purple","medium-purple"],/\.odp$/i], + ["openoffice-icon",["dark-pink","dark-pink"],/\.otp$/i], + ["openoffice-icon",["medium-pink","medium-pink"],/\.fodp$/i], + ["openoffice-icon",["medium-red","medium-red"],/\.odg$/i], + ["openoffice-icon",["dark-red","dark-red"],/\.otg$/i], + ["openoffice-icon",["dark-orange","dark-orange"],/\.fodg$/i], + ["openoffice-icon",["medium-maroon","medium-maroon"],/\.odf$/i], + ["openoffice-icon",["light-pink","light-pink"],/\.odb$/i], + ["scad-icon",["medium-orange","medium-orange"],/\.scad$/i,,false,,/\.scad$/i,/^OpenSCAD$/i], + ["scad-icon",["medium-yellow","medium-yellow"],/\.jscad$/i], + ["org-icon",["dark-green","dark-green"],/\.org$/i], + ["osx-icon",["medium-red","medium-red"],/\.dmg$/i,,false,,,,/^\x78\x01\x73\x0D\x62\x62\x60/], + ["ox-icon",["medium-cyan","dark-cyan"],/\.ox$/i,,false,,/\.ox$/i,/^Ox$/i], + ["ox-icon",["medium-green","dark-green"],/\.oxh$/i], + ["ox-icon",["medium-blue","dark-blue"],/\.oxo$/i], + ["oxygene-icon",["medium-cyan","dark-cyan"],/\.oxygene$/i,,false,,/\.oxygene$/i,/^Oxygene$/i], + ["oz-icon",["medium-yellow","medium-yellow"],/\.oz$/i,,false,,/\.oz$/i,/^Oz$/i], + ["pan-icon",["medium-red","medium-red"],/\.pan$/i], + ["papyrus-icon",["medium-green","medium-green"],/\.psc$/i,,false,,/(?:^|\.)(?:papyrus\.skyrim|compiled-?papyrus|papyrus-assembly)(?:\.|$)/i,/^Papyrus$/i], + ["parrot-icon",["medium-green","medium-green"],/\.parrot$/i,,false,/^parrot$/], + ["parrot-icon",["dark-green","dark-green"],/\.pasm$/i,,false,,/\.parrot\.pasm$/i,/^Parrot$|^pasm$/i], + ["parrot-icon",["dark-blue","dark-blue"],/\.pir$/i,,false,,/\.parrot\.pir$/i,/^Parrot$|^pir$/i], + ["pascal-icon",["medium-purple","medium-purple"],/\.pas(?:cal)?$/i,,false,/pascal|instantfpc/,/\.pascal$/i,/^Pascal$/i], + ["pascal-icon",["medium-blue","medium-blue"],/\.dfm$/i], + ["pascal-icon",["dark-blue","dark-blue"],/\.dpr$/i], + ["pascal-icon",["dark-purple","dark-purple"],/\.lpr$/i], + ["patch-icon",["medium-green","medium-green"],/\.patch$/i], + ["pawn-icon",["medium-orange","medium-orange"],/\.pwn$/i,,false,,/\.pwn$/i,/^PAWN$/i], + ["pdf-icon",["medium-red","medium-red"],/\.pdf$/i,,false,,,,/^%PDF/], + ["perl-icon",["medium-blue","medium-blue"],/\.p(?:er)?l$|\.t$/i,,false,/^perl$/,/\.perl$/i,/^perl$/i], + ["perl-icon",["dark-purple","dark-purple"],/\.ph$/i], + ["perl-icon",["medium-purple","medium-purple"],/\.plx$/i], + ["perl-icon",["dark-blue","dark-blue"],/\.pm$/i], + ["perl-icon",["medium-red","medium-red"],/\.(?:psgi|xs)$/i], + ["perl6-icon",["medium-purple","medium-purple"],/\.pl6$/i,,false,/^perl6$/,/(?:^|\.)perl6(?:fe)?(?=\.|$)/,/^(?:pl6|Perl\s*6)$/i], + ["perl6-icon",["light-blue","light-blue"],/\.[tp]6$|\.6pl$/i], + ["perl6-icon",["dark-pink","dark-pink"],/\.(?:pm6|p6m)$/i], + ["perl6-icon",["dark-cyan","dark-cyan"],/\.6pm$/i], + ["perl6-icon",["dark-purple","dark-purple"],/\.nqp$/i], + ["perl6-icon",["medium-blue","medium-blue"],/\.p6l$/i], + ["perl6-icon",["dark-green","dark-green"],/\.pod6$/i], + ["perl6-icon",["medium-green","medium-green"],/^Rexfile$/], + ["phalcon-icon",["medium-cyan","medium-cyan"],/\.volt$/i,,false,,/\.volt$/i,/^Phalcon$/i], + ["php-icon",["dark-blue","dark-blue"],/\.php(?:[st\d]|_cs)?$/i,,false,/^php$/,/\.php$/i,/^PHP$/i,/^<\?php/], + ["php-icon",["dark-green","dark-green"],/^Phakefile/], + ["pickle-icon",["dark-cyan","dark-cyan"],/\.pkl$/i], + ["pike-icon",["dark-cyan","dark-cyan"],/\.pike$/i,,false,/^pike$/], + ["pike-icon",["medium-blue","medium-blue"],/\.pmod$/i], + ["sql-icon",["medium-red","medium-red"],/\.(?:pls|pck|pks|plb|plsql|pkb)$/i,,false,,/\.plsql(?:\.oracle)?(?:\.|$)/i,/^PLSQL$/i], + ["pod-icon",["dark-blue","dark-blue"],/\.pod$/i], + ["pogo-icon",["medium-orange","dark-orange"],/\.pogo$/i,,false,,/\.pogoscript$/i,/^PogoScript$/i], + ["pony-icon",["light-maroon","light-maroon"],/\.pony$/i,,false,,/\.pony$/i,/^Pony$/i], + ["postcss-icon",["dark-red","dark-red"],/\.p(?:ost)?css$/i,,false,/^postcss$/,/\.postcss$/i,/^p[0o]stcss$/i], + ["postcss-icon",["dark-pink","dark-pink"],/\.sss$/i,,false,/^sugarss$/,/\.sugarss$/i,/^PostCSS$|^sugarss$/i], + ["postcss-icon",["medium-orange","dark-orange"],/\.postcssrc$/i], + ["postscript-icon",["medium-red","medium-red"],/\.ps$/i,,false,,/\.postscript$/i,/^PostScript$|^p[0o]stscr$/i,/^%!PS/], + ["postscript-icon",["medium-orange","medium-orange"],/\.eps$/i], + ["postscript-icon",["dark-blue","dark-blue"],/\.pfa$/i], + ["postscript-icon",["medium-green","medium-green"],/\.afm$/i], + ["povray-icon",["dark-blue","dark-blue"],/\.pov$/i], + ["powerbuilder-icon",["medium-blue","medium-blue"],/\.pbl$|\.sra$/i], + ["powerbuilder-icon",["dark-blue","dark-blue"],/\.pbt$/i], + ["powerbuilder-icon",["medium-red","medium-red"],/\.srw$/i], + ["powerbuilder-icon",["medium-orange","medium-orange"],/\.sru$/i], + ["powerbuilder-icon",["medium-maroon","medium-maroon"],/\.srp$/i], + ["powerbuilder-icon",["medium-purple","medium-purple"],/\.srj$/i], + ["powershell-icon",["medium-blue","medium-blue"],/\.ps1$/i,,false,,/\.powershell$/i,/^PowerShell$|^p[0o]sh$/i], + ["powershell-icon",["dark-blue","dark-blue"],/\.psd1$/i], + ["powershell-icon",["medium-purple","medium-purple"],/\.psm1$/i], + ["powershell-icon",["dark-purple","dark-purple"],/\.ps1xml$/i], + ["print-icon",["dark-cyan","dark-cyan"],/\.ppd$/i], + ["processing-icon",["dark-blue","dark-blue"],/\.pde$/i,,false,,/\.processing$/i,/^Processing$/i], + ["prolog-icon",["medium-blue","medium-blue"],/\.pro$/i,,false,/^swipl$/,/\.prolog$/i,/^Prolog$/i], + ["prolog-icon",["medium-cyan","medium-cyan"],/\.prolog$/i], + ["prolog-icon",["medium-purple","medium-purple"],/\.yap$/i,,false,/^yap$/], + ["propeller-icon",["medium-orange","medium-orange"],/\.spin$/i,,false,,/\.spin$/i,/^Propeller Spin$/i], + ["pug-icon",["medium-red","medium-red"],/\.pug$/i,,false,,/\.pug$/i,/^Pug$/i], + ["puppet-icon",["medium-purple","medium-purple"],/\.pp$/i,,false,/^puppet$/,/\.puppet$/i,/^puppet$/i], + ["puppet-icon",["dark-blue","dark-blue"],/Modulefile$/i], + ["purebasic-icon",["medium-red","medium-red"],/\.pb$/i,,false,/^purebasic$/,/\.purebasic$/i,/^purebasic$/i], + ["purebasic-icon",["dark-orange","dark-orange"],/\.pbi$/i], + ["purescript-icon",["dark-purple","dark-purple"],/\.purs$/i,,false,,/\.purescript$/i,/^PureScript$/i], + ["python-icon",["dark-blue","dark-blue"],/\.py$|\.bzl$|\.py3$|\.?(?:pypirc|pythonrc|python-venv)$/i,,false,/python[\d.]*/,/\.python$/i,/^Python$|^rusth[0o]n$/i], + ["python-icon",["medium-blue","medium-blue"],/\.ipy$/i], + ["python-icon",["dark-green","dark-green"],/\.isolate$|\.gypi$|\.pyt$/i], + ["python-icon",["medium-orange","medium-orange"],/\.pep$|\.pyde$/i,,false,/^pep8$/,/\.pep8$/i,/^Python$|^pep8$/i], + ["python-icon",["medium-green","medium-green"],/\.gyp$/i], + ["python-icon",["dark-purple","dark-purple"],/\.pyp$/i], + ["python-icon",["medium-maroon","medium-maroon"],/\.pyw$/i], + ["python-icon",["dark-pink","dark-pink"],/\.tac$/i], + ["python-icon",["dark-red","dark-red"],/\.wsgi$/i], + ["python-icon",["medium-yellow","dark-yellow"],/\.xpy$/i], + ["python-icon",["medium-pink","medium-pink"],/\.rpy$/i,,false,,/\.renpy$/i,/^Python$|^Ren'?Py$/i], + ["python-icon",["dark-green","dark-green"],/^(?:BUCK|BUILD|SConstruct|SConscript)$/], + ["python-icon",["medium-green","medium-green"],/^(?:Snakefile|WATCHLISTS)$/], + ["python-icon",["dark-maroon","dark-maroon"],/^wscript$/], + ["r-icon",["medium-blue","medium-blue"],/\.(?:r|Rprofile|rsx|rd)$/i,,false,/^Rscript$/,/\.r$/i,/^R$|^(?:Rscript|splus|Rlang)$/i], + ["racket-icon",["medium-red","medium-red"],/\.rkt$/i,,false,/^racket$/,/\.racket$/i,/^racket$/i], + ["racket-icon",["medium-blue","medium-blue"],/\.rktd$/i], + ["racket-icon",["light-red","light-red"],/\.rktl$/i], + ["racket-icon",["dark-blue","dark-blue"],/\.scrbl$/i,,false,/^scribble$/,/\.scribble$/i,/^Racket$|^scribble$/i], + ["raml-icon",["medium-cyan","medium-cyan"],/\.raml$/i,,false,,/\.raml$/i,/^RAML$/i], + ["rascal-icon",["medium-yellow","medium-yellow"],/\.rsc$/i,,false,,/\.rascal$/i,/^Rascal$/i], + ["rdoc-icon",["medium-red","medium-red"],/\.rdoc$/i,,false,,/\.rdoc$/i,/^RDoc$/i], + ["xojo-icon",["medium-green","medium-green"],/\.rbbas$/i], + ["xojo-icon",["dark-green","dark-green"],/\.rbfrm$/i], + ["xojo-icon",["dark-cyan","dark-cyan"],/\.rbmnu$/i], + ["xojo-icon",["medium-cyan","medium-cyan"],/\.rbres$/i], + ["xojo-icon",["medium-blue","medium-blue"],/\.rbtbar$/i], + ["xojo-icon",["dark-blue","dark-blue"],/\.rbuistate$/i], + ["reason-icon",["medium-red","medium-red"],/\.re$/i,,false,/^reason$/,/\.reason$/i,/^reas[0o]n$/i], + ["reason-icon",["medium-orange","medium-orange"],/\.rei$/i], + ["rebol-icon",["dark-green","dark-green"],/\.reb(?:ol)?$/i,,false,/^rebol$/,/\.rebol$/i,/^reb[0o]l$/i], + ["rebol-icon",["dark-red","dark-red"],/\.r2$/i], + ["rebol-icon",["dark-blue","dark-blue"],/\.r3$/i], + ["red-icon",["medium-red","medium-red"],/\.red$/i,,false,,/\.red$/i,/^Red$|^red\/?system$/i], + ["red-icon",["light-red","light-red"],/\.reds$/i], + ["red-hat-icon",["medium-red","medium-red"],/\.rpm$/i], + ["red-hat-icon",["dark-red","dark-red"],/\.spec$/i], + ["regex-icon",["medium-green","medium-green"],/\.regexp?$/i,,false,,/(?:\.|^)regexp?(?:\.|$)/i,/^RegExp$/i], + ["android-icon",["dark-maroon","dark-maroon"],/\.rsh$/i], + ["rst-icon",["dark-blue","dark-blue"],/\.re?st(?:\.txt)?$/i,,false,,/\.restructuredtext$/i,/^reStructuredText$|^re?st$/i], + ["rexx-icon",["medium-red","medium-red"],/\.rexx?$/i,,false,/rexx|regina/i,/\.rexx$/i,/^REXX$/i], + ["rexx-icon",["medium-blue","medium-blue"],/\.pprx$/i], + ["riot-icon",["medium-red","medium-red"],/\.tag$/i,,false,,/\.riot$/i,/^RiotJS$/i], + ["robot-icon",["medium-purple","medium-purple"],/\.robot$/i], + ["clojure-icon",["medium-red","medium-red"],/\.rg$/i], + ["rss-icon",["medium-orange","medium-orange"],/\.rss$/i], + ["ruby-icon",["medium-red","medium-red"],/\.(?:rb|ru|ruby|erb|gemspec|god|mspec|pluginspec|podspec|rabl|rake|opal)$|^\.?(?:irbrc|gemrc|pryrc|rspec|ruby-(?:gemset|version))$/i,,false,/(?:mac|j)?ruby|rake|rbx/,/\.ruby$/i,/^Ruby$|^(?:rbx?|rake|jruby|macruby)$/i], + ["ruby-icon",["medium-red","medium-red"],/^(?:Appraisals|(?:Rake|Gem|[bB]uild|Berks|Cap|Danger|Deliver|Fast|Guard|Jar|Maven|Pod|Puppet|Snap)file(?:\.lock)?)$|^rails$/], + ["ruby-icon",["dark-red","dark-red"],/\.(?:jbuilder|rbuild|rb[wx]|builder)$/i], + ["ruby-icon",["dark-yellow","dark-yellow"],/\.watchr$/i], + ["rust-icon",["medium-maroon","medium-maroon"],/\.rs$/i,,false,/^rust$/,/\.rust$/i,/^rust$/i], + ["rust-icon",["light-maroon","light-maroon"],/\.rlib$/i], + ["sage-icon",["medium-blue","medium-blue"],/\.sage$/i,,false,/^sage$/,/\.sage$/i,/^sage$/i], + ["sage-icon",["dark-blue","dark-blue"],/\.sagews$/i], + ["saltstack-icon",["medium-blue","dark-blue"],/\.sls$/i,,false,,/\.salt$/i,/^SaltStack$|^Salt(?:State)?$/i], + ["sas-icon",["medium-blue","medium-blue"],/\.sas$/i,,false,,/\.sas$/i,/^SAS$/i], + ["sass-icon",["light-pink","light-pink"],/\.scss$/i,,false,/^scss$/,/\.scss$/i,/^Sass$|^scss$/i], + ["sass-icon",["dark-pink","dark-pink"],/\.sass$/i,,false,/^sass$/,/\.sass$/i,/^sass$/i], + ["sbt-icon",["dark-purple","dark-purple"],/\.sbt$/i], + ["scala-icon",["medium-red","medium-red"],/\.(?:sc|scala)$/i,,false,/^scala$/,/\.scala$/i,/^Scala$/i], + ["scheme-icon",["medium-red","medium-red"],/\.scm$/i,,false,/guile|bigloo|chicken/,/\.scheme$/i,/^Scheme$/i], + ["scheme-icon",["medium-blue","medium-blue"],/\.sld$/i], + ["scheme-icon",["medium-purple","medium-purple"],/\.sps$/i], + ["scilab-icon",["dark-purple","dark-purple"],/\.sci$/i,,false,/^scilab$/,/\.scilab$/i,/^scilab$/i], + ["scilab-icon",["dark-blue","dark-blue"],/\.sce$/i], + ["scilab-icon",["dark-cyan","dark-cyan"],/\.tst$/i], + ["secret-icon",[null,null],/\.secret$/i], + ["self-icon",["dark-blue","dark-blue"],/\.self$/i,,false,,/\.self$/i,/^Self$/i], + ["graph-icon",["light-red","light-red"],/\.csv$/i,,false,,/(?:^|\.)csv(?:\.semicolon)?(?:\.|$)/i], + ["graph-icon",["light-green","light-green"],/\.(?:tab|tsv)$/i], + ["graph-icon",["medium-green","medium-green"],/\.dif$/i], + ["graph-icon",["medium-cyan","medium-cyan"],/\.slk$/i], + ["sf-icon",["light-orange","light-orange"],/\.sfproj$/i], + ["terminal-icon",["medium-purple","medium-purple"],/\.(?:sh|rc|bats|bash|tool|install|command)$/i,,false,/bash|sh|zsh|rc/,/\.shell$/i,/^(?:sh|shell|Shell-?Script|Bash)$/i], + ["terminal-icon",["dark-purple","dark-purple"],/^(?:\.?bash(?:rc|[-_]?(?:profile|login|logout|history|prompt))|_osc|config|install-sh|PKGBUILD)$/i], + ["terminal-icon",["dark-yellow","dark-yellow"],/\.ksh$/i], + ["terminal-icon",["medium-yellow","dark-yellow"],/\.sh-session$/i,,false,,/\.shell-session$/i,/^(?:Bash|Shell|Sh)[-\s]*(?:Session|Console)$/i], + ["terminal-icon",["medium-blue","medium-blue"],/\.zsh(?:-theme|_history)?$|^\.?(?:antigen|zpreztorc|zlogin|zlogout|zprofile|zshenv|zshrc)$|\.tmux$/i], + ["terminal-icon",["medium-green","medium-green"],/\.fish$|^\.fishrc$|\.tcsh$/i,,false,/^fish$/,/\.fish$/i,/^fish$/i], + ["terminal-icon",["medium-red","medium-red"],/\.inputrc$/i], + ["terminal-icon",["medium-red","medium-red"],/^(?:configure|config\.(?:guess|rpath|status|sub)|depcomp|libtool|compile)$/], + ["terminal-icon",["dark-purple","dark-purple"],/^\/(?:private\/)?etc\/(?:[^\/]+\/)*(?:profile$|nanorc$|rc\.|csh\.)/i,,true], + ["terminal-icon",["medium-yellow","medium-yellow"],/\.csh$/i], + ["shen-icon",["dark-cyan","dark-cyan"],/\.shen$/i], + ["shopify-icon",["medium-green","medium-green"],/\.liquid$/i], + ["sigils-icon",["dark-red","dark-red"],/\.sigils$/i], + ["silverstripe-icon",["medium-blue","medium-blue"],/\.ss$/i,,false,,/(?:^|\.)ss(?:template)?(?:\.|$)/i,/^SilverStripe$/i], + ["sketch-icon",["medium-orange","medium-orange"],/\.sketch$/i], + ["slash-icon",["dark-blue","dark-blue"],/\.sl$/i,,false,,/\.slash$/i,/^Slash$/i], + ["android-icon",["medium-green","medium-green"],/\.smali$/i,,false,,/\.smali$/i,/^Smali$/i], + ["smarty-icon",["medium-yellow","dark-yellow"],/\.tpl$/i,,false,,/\.smarty$/i,/^Smarty$/i], + ["snyk-icon",["dark-purple","dark-purple"],/\.snyk$/i], + ["clojure-icon",["medium-yellow","dark-yellow"],/\.(?:sma|sp)$/i,,false,,/\.sp$/i,/^SourcePawn$|^s[0o]urcem[0o]d$/i], + ["sparql-icon",["medium-blue","medium-blue"],/\.sparql$/i,,false,,/\.rq$/i,/^SPARQL$/i], + ["sparql-icon",["dark-blue","dark-blue"],/\.rq$/i], + ["sqf-icon",["dark-maroon","dark-maroon"],/\.sqf$/i,,false,/^sqf$/,/\.sqf$/i,/^sqf$/i], + ["sqf-icon",["dark-red","dark-red"],/\.hqf$/i], + ["sql-icon",["medium-orange","medium-orange"],/\.(?:my)?sql$/i,,false,/^sql$/,/\.sql$/i,/^sql$/i], + ["sql-icon",["medium-blue","medium-blue"],/\.ddl$/i], + ["sql-icon",["medium-green","medium-green"],/\.udf$/i], + ["sql-icon",["dark-cyan","dark-cyan"],/\.viw$/i], + ["sql-icon",["dark-blue","dark-blue"],/\.prc$/i], + ["sql-icon",["medium-purple","medium-purple"],/\.db2$/i], + ["sqlite-icon",["medium-blue","medium-blue"],/\.sqlite$/i], + ["sqlite-icon",["dark-blue","dark-blue"],/\.sqlite3$/i], + ["sqlite-icon",["medium-purple","medium-purple"],/\.db$/i], + ["sqlite-icon",["dark-purple","dark-purple"],/\.db3$/i], + ["squirrel-icon",["medium-maroon","medium-maroon"],/\.nut$/i,,false,,/\.nut$/i,/^Squirrel$/i], + ["key-icon",["medium-yellow","medium-yellow"],/\.pub$/i], + ["key-icon",["medium-orange","medium-orange"],/\.pem$/i], + ["key-icon",["medium-blue","medium-blue"],/\.key$|\.crt$/i], + ["key-icon",["medium-purple","medium-purple"],/\.der$/i], + ["key-icon",["medium-red","medium-red"],/^id_rsa/], + ["key-icon",["medium-green","medium-green"],/\.glyphs\d*License$|^git-credential-osxkeychain$/i], + ["key-icon",["dark-green","dark-green"],/^(?:master\.)?passwd$/i], + ["stan-icon",["medium-red","medium-red"],/\.stan$/i,,false,,/\.stan$/i,/^Stan$/i], + ["stata-icon",["medium-blue","medium-blue"],/\.do$/i,,false,/^stata$/,/\.stata$/i,/^stata$/i], + ["stata-icon",["dark-blue","dark-blue"],/\.ado$/i], + ["stata-icon",["light-blue","light-blue"],/\.doh$/i], + ["stata-icon",["medium-cyan","medium-cyan"],/\.ihlp$/i], + ["stata-icon",["dark-cyan","dark-cyan"],/\.mata$/i,,false,/^mata$/,/\.mata$/i,/^Stata$|^mata$/i], + ["stata-icon",["light-cyan","light-cyan"],/\.matah$/i], + ["stata-icon",["medium-purple","medium-purple"],/\.sthlp$/i], + ["storyist-icon",["medium-blue","medium-blue"],/\.story$/i], + ["strings-icon",["medium-red","medium-red"],/\.strings$/i,,false,,/\.strings$/i,/^Strings$/i], + ["stylus-icon",["medium-green","medium-green"],/\.styl$/i,,false,,/\.stylus$/i,/^Stylus$/i], + ["sublime-icon",["medium-orange","medium-orange"],/\.(?:stTheme|sublime[-_](?:build|commands|completions|keymap|macro|menu|mousemap|project|settings|theme|workspace|metrics|session|snippet))$/i], + ["sublime-icon",["dark-orange","dark-orange"],/\.sublime-syntax$/i], + ["scd-icon",["medium-red","medium-red"],/\.scd$/i,,false,/sclang|scsynth/,/\.supercollider$/i,/^SuperCollider$/i], + ["svg-icon",["dark-yellow","dark-yellow"],/\.svg$/i,,false,,/\.svg$/i,/^SVG$/i], + ["swift-icon",["medium-green","medium-green"],/\.swift$/i,,false,,/\.swift$/i,/^Swift$/i], + ["sysverilog-icon",["medium-blue","dark-blue"],/\.sv$/i], + ["sysverilog-icon",["medium-green","dark-green"],/\.svh$/i], + ["sysverilog-icon",["medium-cyan","dark-cyan"],/\.vh$/i], + ["tag-icon",["medium-blue","medium-blue"],/\.?c?tags$/i], + ["tag-icon",["medium-red","medium-red"],/\.gemtags/i], + ["tcl-icon",["dark-orange","dark-orange"],/\.tcl$/i,,false,/tclsh|wish/,/\.tcl$/i,/^Tcl$/i], + ["tcl-icon",["medium-orange","medium-orange"],/\.adp$/i], + ["tcl-icon",["medium-red","medium-red"],/\.tm$/i], + ["coffee-icon",["medium-orange","medium-orange"],/\.tea$/i,,false,,/\.tea$/i,/^Tea$/i], + ["tt-icon",["medium-blue","medium-blue"],/\.tt2?$/i], + ["tt-icon",["medium-purple","medium-purple"],/\.tt3$/i], + ["tern-icon",["medium-blue","medium-blue"],/\.tern-project$/i], + ["terraform-icon",["dark-purple","dark-purple"],/\.tf(?:vars)?$/i,,false,,/\.terra(?:form)?$/i,/^Terraform$/i], + ["tex-icon",["medium-blue","dark-blue"],/\.tex$|\.ltx$|\.lbx$/i,,false,,/(?:^|\.)latex(?:\.|$)/i,/^TeX$|^latex$/i], + ["tex-icon",["medium-green","dark-green"],/\.aux$|\.ins$/i], + ["tex-icon",["medium-red","dark-red"],/\.sty$|\.texi$/i,,false,,/(?:^|\.)tex(?:\.|$)/i,/^TeX$/i], + ["tex-icon",["medium-maroon","dark-maroon"],/\.dtx$/i], + ["tex-icon",["medium-orange","dark-orange"],/\.cls$|\.mkiv$|\.mkvi$|\.mkii$/i], + ["text-icon",["medium-blue","medium-blue"],/\.te?xt$|\.irclog$|\.uot$/i,,false,,,,/^\xEF\xBB\xBF|^\xFF\xFE/], + ["text-icon",["medium-maroon","medium-maroon"],/\.log$|^Terminal[-_\s]Saved[-_\s]Output$|\.brf$/i], + ["text-icon",["dark-red","dark-red"],/\.git[\/\\]description$/,,true], + ["text-icon",["medium-red","medium-red"],/\.err$|\.no$|^(?:bug-report|fdl|for-release|tests)$/i], + ["text-icon",["dark-red","dark-red"],/\.rtf$|\.uof$/i], + ["text-icon",["dark-blue","dark-blue"],/\.i?nfo$/i], + ["text-icon",["dark-purple","dark-purple"],/\.abt$|\.sub$/i], + ["text-icon",["dark-orange","dark-orange"],/\.ans$/i], + ["text-icon",["medium-yellow","medium-yellow"],/\.etx$/i], + ["text-icon",["medium-orange","medium-orange"],/\.msg$/i], + ["text-icon",["medium-purple","medium-purple"],/\.srt$|\.uop$/i], + ["text-icon",["medium-cyan","medium-cyan"],/\.(?:utxt|utf8)$/i], + ["text-icon",["medium-green","medium-green"],/\.weechatlog$|\.uos$/i], + ["textile-icon",["medium-orange","medium-orange"],/\.textile$/i,,false,,/\.textile$/i,/^Textile$/i], + ["textmate-icon",["dark-green","dark-green"],/\.tmcg$/i], + ["textmate-icon",["dark-purple","dark-purple"],/\.tmLanguage$/i], + ["textmate-icon",["medium-blue","medium-blue"],/\.tmCommand$/i], + ["textmate-icon",["dark-blue","dark-blue"],/\.tmPreferences$/i], + ["textmate-icon",["dark-orange","dark-orange"],/\.tmSnippet$/i], + ["textmate-icon",["medium-pink","medium-pink"],/\.tmTheme$/i], + ["textmate-icon",["medium-maroon","medium-maroon"],/\.tmMacro$/i], + ["textmate-icon",["medium-orange","medium-orange"],/\.yaml-tmlanguage$/i], + ["textmate-icon",["medium-purple","medium-purple"],/\.JSON-tmLanguage$/i], + ["thor-icon",["medium-orange","medium-orange"],/\.thor$/i], + ["thor-icon",["dark-orange","dark-orange"],/^Thorfile$/i], + ["tsx-icon",["light-blue","light-blue"],/\.tsx$/i,,false,,/\.tsx$/i,/^TSX$/i], + ["turing-icon",["medium-red","medium-red"],/\.tu$/i,,false,,/\.turing$/i,/^Turing$/i], + ["twig-icon",["medium-green","medium-green"],/\.twig$/i,,false,,/\.twig$/i,/^Twig$/i], + ["txl-icon",["medium-orange","medium-orange"],/\.txl$/i,,false,,/\.txl$/i,/^TXL$/i], + ["ts-icon",["medium-blue","medium-blue"],/\.ts$/i,,false,,/\.ts$/i,/^(?:ts|Type[-\s]*Script)$/i], + ["unity3d-icon",["dark-blue","dark-blue"],/\.anim$/i,,false,/^shaderlab$/,/\.shaderlab$/i,/^Unity3D$|^shaderlab$/i], + ["unity3d-icon",["dark-green","dark-green"],/\.asset$/i], + ["unity3d-icon",["medium-red","medium-red"],/\.mat$/i], + ["unity3d-icon",["dark-red","dark-red"],/\.meta$/i], + ["unity3d-icon",["dark-cyan","dark-cyan"],/\.prefab$/i], + ["unity3d-icon",["medium-blue","medium-blue"],/\.unity$/i], + ["unity3d-icon",["medium-maroon","medium-maroon"],/\.unityproj$/i], + ["uno-icon",["dark-blue","dark-blue"],/\.uno$/i], + ["unreal-icon",[null,null],/\.uc$/i,,false,,/\.uc$/i,/^UnrealScript$/i], + ["link-icon",["dark-blue","dark-blue"],/\.url$/i], + ["urweb-icon",["medium-maroon","medium-maroon"],/\.ur$/i,,false,,/\.ur$/i,/^UrWeb$|^Ur(?:\/Web)?$/i], + ["urweb-icon",["dark-blue","dark-blue"],/\.urs$/i], + ["vagrant-icon",["medium-cyan","medium-cyan"],/^Vagrantfile$/i], + ["gnome-icon",["medium-purple","medium-purple"],/\.vala$/i,,false,/^vala$/,/\.vala$/i,/^vala$/i], + ["gnome-icon",["dark-purple","dark-purple"],/\.vapi$/i], + ["varnish-icon",["dark-blue","dark-blue"],/\.vcl$/i,,false,,/(?:^|\.)(?:varnish|vcl)(?:\.|$)/i,/^VCL$/i], + ["verilog-icon",["dark-green","dark-green"],/\.v$/i,,false,/^verilog$/,/\.verilog$/i,/^veril[0o]g$/i], + ["verilog-icon",["medium-red","medium-red"],/\.veo$/i], + ["vhdl-icon",["dark-green","dark-green"],/\.vhdl$/i,,false,/^vhdl$/,/\.vhdl$/i,/^vhdl$/i], + ["vhdl-icon",["medium-green","medium-green"],/\.vhd$/i], + ["vhdl-icon",["dark-blue","dark-blue"],/\.vhf$/i], + ["vhdl-icon",["medium-blue","medium-blue"],/\.vhi$/i], + ["vhdl-icon",["dark-purple","dark-purple"],/\.vho$/i], + ["vhdl-icon",["medium-purple","medium-purple"],/\.vhs$/i], + ["vhdl-icon",["dark-red","dark-red"],/\.vht$/i], + ["vhdl-icon",["dark-orange","dark-orange"],/\.vhw$/i], + ["video-icon",["medium-blue","medium-blue"],/\.3gpp?$/i,,false,,,,/^.{4}ftyp3g/], + ["video-icon",["dark-blue","dark-blue"],/\.(?:mp4|m4v|h264)$/i,,false,,,,/^.{4}ftyp/], + ["video-icon",["medium-blue","medium-blue"],/\.avi$/i,,false,,,,/^MLVI/], + ["video-icon",["medium-cyan","medium-cyan"],/\.mov$/i,,false,,,,/^.{4}moov/], + ["video-icon",["medium-purple","medium-purple"],/\.mkv$/i,,false,,,,/^\x1AEߣ\x93B\x82\x88matroska/], + ["video-icon",["medium-red","medium-red"],/\.flv$/i,,false,,,,/^FLV\x01/], + ["video-icon",["dark-blue","dark-blue"],/\.webm$/i,,false,,,,/^\x1A\x45\xDF\xA3/], + ["video-icon",["medium-red","medium-red"],/\.mpe?g$/i,,false,,,,/^\0{2}\x01[\xB3\xBA]/], + ["video-icon",["dark-purple","dark-purple"],/\.(?:asf|wmv)$/i,,false,,,,/^0&²u\x8EfÏ\x11¦Ù\0ª\0bÎl/], + ["video-icon",["medium-orange","medium-orange"],/\.(?:ogm|og[gv])$/i,,false,,,,/^OggS/], + ["vim-icon",["medium-green","medium-green"],/\.(?:vim|n?vimrc)$/i,,false,/Vim?/i,/\.viml$/i,/^(?:VimL?|NVim|Vim\s*Script)$/i], + ["vim-icon",["dark-green","dark-green"],/^[gn_]?vim(?:rc|info)$/i], + ["vs-icon",["medium-blue","medium-blue"],/\.(?:vba?|fr[mx]|bas)$/i,,false,,/\.vbnet$/i,/^Visual Studio$|^vb\.?net$/i], + ["vs-icon",["medium-red","medium-red"],/\.vbhtml$/i], + ["vs-icon",["medium-green","medium-green"],/\.vbs$/i], + ["vs-icon",["dark-blue","dark-blue"],/\.csproj$/i], + ["vs-icon",["dark-red","dark-red"],/\.vbproj$/i], + ["vs-icon",["dark-purple","dark-purple"],/\.vcx?proj$/i], + ["vs-icon",["dark-green","dark-green"],/\.vssettings$/i], + ["vs-icon",["medium-maroon","medium-maroon"],/\.builds$/i], + ["vs-icon",["medium-orange","medium-orange"],/\.sln$/i], + ["vue-icon",["light-green","light-green"],/\.vue$/i,,false,,/\.vue$/i,/^Vue$/i], + ["owl-icon",["dark-blue","dark-blue"],/\.owl$/i], + ["windows-icon",["medium-purple","medium-purple"],/\.bat$|\.cmd$/i,,false,,/(?:^|\.)(?:bat|dosbatch)(?:\.|$)/i,/^(?:bat|(?:DOS|Win)?Batch)$/i], + ["windows-icon",[null,null],/\.(?:exe|com|msi)$/i], + ["windows-icon",["medium-blue","medium-blue"],/\.reg$/i], + ["x10-icon",["light-maroon","light-maroon"],/\.x10$/i,,false,,/\.x10$/i,/^X10$|^xten$/i], + ["x11-icon",["medium-orange","medium-orange"],/\.X(?:authority|clients|initrc|profile|resources|session-errors|screensaver)$/i], + ["xmos-icon",["medium-orange","medium-orange"],/\.xc$/i], + ["appstore-icon",["medium-blue","medium-blue"],/\.(?:pbxproj|pbxuser|mode\dv\3|xcplugindata|xcrequiredplugins)$/i], + ["xojo-icon",["medium-green","medium-green"],/\.xojo_code$/i], + ["xojo-icon",["medium-blue","medium-blue"],/\.xojo_menu$/i], + ["xojo-icon",["medium-red","medium-red"],/\.xojo_report$/i], + ["xojo-icon",["dark-green","dark-green"],/\.xojo_script$/i], + ["xojo-icon",["dark-purple","dark-purple"],/\.xojo_toolbar$/i], + ["xojo-icon",["dark-cyan","dark-cyan"],/\.xojo_window$/i], + ["xpages-icon",["medium-blue","medium-blue"],/\.xsp-config$/i], + ["xpages-icon",["dark-blue","dark-blue"],/\.xsp\.metadata$/i], + ["xmos-icon",["dark-blue","dark-blue"],/\.xpl$/i], + ["xmos-icon",["medium-purple","medium-purple"],/\.xproc$/i], + ["sql-icon",["dark-red","dark-red"],/\.(?:xquery|xq|xql|xqm|xqy)$/i,,false,,/\.xq$/i,/^XQuery$/i], + ["xtend-icon",["dark-purple","dark-purple"],/\.xtend$/i,,false,,/\.xtend$/i,/^Xtend$/i], + ["yang-icon",["medium-yellow","medium-yellow"],/\.yang$/i,,false,,/\.yang$/i,/^YANG$/i], + ["zbrush-icon",["dark-purple","dark-purple"],/\.zpr$/i], + ["zephir-icon",["medium-pink","medium-pink"],/\.zep$/i], + ["zimpl-icon",["medium-orange","medium-orange"],/\.(?:zimpl|zmpl|zpl)$/i], + ["apple-icon",["medium-blue","medium-blue"],/^com\.apple\./,0.5], + ["apache-icon",["medium-red","medium-red"],/^httpd\.conf/i,0], + ["checklist-icon",["medium-yellow","medium-yellow"],/TODO/,0], + ["config-icon",[null,null],/config|settings|option|pref/i,0], + ["doge-icon",["medium-yellow","medium-yellow"],/\.djs$/i,0,false,,/\.dogescript$/i,/^Dogescript$/i], + ["gear-icon",[null,null],/^\./,0], + ["book-icon",["medium-blue","medium-blue"],/\b(?:changelog|copying(?:v?\d)?|install|read[-_]?me)\b|^licen[sc]es?[-._]/i,0], + ["book-icon",["dark-blue","dark-blue"],/^news(?:[-_.]?[-\d]+)?$/i,0], + ["v8-icon",["medium-blue","medium-blue"],/^(?:[dv]8|v8[-_.][^.]*|mksnapshot|mkpeephole)$/i,0]], + [[69,147,152,154,169,192,195,196,197,198,204,217,239,244,249,251,253,258,287,292,293,303,304,309,331,333,336,343,347,353,362,380,395,398,416,420,421,422,424,431,434,448,451,465,467,468,471,480,481,482,485,486,487,525,526,529,534,555,565,570,571,572,578,580,584,586,590,601,602,626,629,658,669,670,681,688,694,696,709,714,715,745,748,755,760,769,772,778,779,798,800,803,805,808,811,822,823,826,836,838,848,854,858,860,864,865,867,868,871,881,886,903,905,924,928,936,944,987,1000,1003,1005,1023],[42,57,69,105,120,121,124,126,129,143,145,147,149,151,152,154,156,157,158,166,167,169,174,192,194,195,196,197,198,204,206,210,211,213,215,216,217,223,224,225,229,230,234,236,237,238,239,242,243,244,249,251,253,255,256,258,275,285,286,287,288,290,291,292,293,294,295,297,300,301,303,304,309,312,314,326,330,336,341,342,343,346,347,350,351,352,353,359,362,365,380,381,382,383,386,390,392,394,395,398,400,416,422,439,440,442,448,451,452,453,454,458,461,463,465,466,467,468,469,470,471,472,473,474,475,479,482,485,486,487,488,489,490,522,524,525,527,529,530,533,534,543,546,547,548,549,553,555,558,560,561,565,570,571,575,578,580,582,584,586,590,600,601,602,603,604,605,612,618,626,629,657,658,664,665,668,669,675,678,679,680,681,685,687,688,689,690,691,694,696,704,707,709,714,715,716,717,718,719,734,738,741,742,744,746,747,748,753,755,760,768,769,774,776,777,778,779,781,792,797,798,801,802,803,805,807,808,811,818,822,823,826,827,828,829,836,838,841,845,847,848,850,854,858,860,862,863,864,865,867,868,871,875,881,884,886,894,896,897,898,900,901,903,905,915,923,924,928,932,933,936,937,938,944,947,951,952,954,970,982,983,984,985,986,987,995,997,1000,1002,1003,1005,1023,1025,1034,1036,1039,1053,1054,1055,1063],[41,150,282,283,284,321,889,959],[42,57,69,105,120,121,124,126,129,143,145,147,149,151,152,154,156,157,158,166,167,169,174,192,194,195,196,197,198,204,206,210,211,213,215,216,217,223,224,225,229,230,234,236,237,238,239,242,243,244,249,251,253,255,256,258,275,276,285,286,287,288,290,291,292,293,294,295,297,300,301,303,304,309,311,312,314,319,326,330,336,341,342,343,346,347,350,351,352,353,359,362,365,380,381,382,383,386,390,392,394,395,398,400,412,416,418,420,421,422,424,431,432,434,439,440,442,448,451,452,453,454,458,461,463,465,466,467,468,469,470,471,472,473,474,475,479,480,481,482,483,485,486,487,488,489,490,522,524,525,527,529,530,533,534,543,546,547,548,549,553,555,558,560,561,565,570,571,575,578,580,582,584,586,590,600,601,602,603,604,605,612,618,626,629,657,658,660,661,664,665,668,669,675,678,679,680,681,685,687,688,689,690,691,694,696,704,707,709,714,715,716,717,718,719,734,738,741,742,744,746,747,748,753,755,760,768,769,774,776,777,778,779,781,792,797,798,801,802,803,805,807,808,811,818,822,823,826,827,828,829,836,838,841,845,847,848,850,854,858,860,862,863,864,865,867,868,871,875,876,881,884,886,894,896,897,898,900,901,903,905,915,923,924,928,932,933,936,937,938,944,947,951,952,954,970,982,983,984,985,986,987,995,997,1000,1002,1003,1005,1023,1025,1034,1036,1039,1053,1054,1055,1063],[106,138,178,179,180,181,182,183,184,185,186,188,189,235,261,262,263,264,265,268,273,348,372,373,374,375,376,377,410,411,493,494,495,496,497,498,499,500,501,503,504,505,506,507,509,510,511,512,513,514,516,519,520,601,674,737,754,769,781,957,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022]]] + ]; + + /* --------------------------------------------------------------------------- + * FileIcons + * ------------------------------------------------------------------------- */ + + /** + * Create FileIcons instance + * + * @param {Array} icondb - Icons database + * @class + * @constructor + */ + + var FileIcons = function(icondb) { + this.db = new IconTables(icondb) + } + + /** + * Get icon class name of the provided filename. If not found, default to text icon. + * + * @param {string} name - file name + * @return {string} + * @public + */ + + FileIcons.prototype.getClass = function(name) { + var match = this.db.matchName(name) + return match ? match.getClass() : null + } + + /** + * Get icon class name of the provided filename with color. If not found, default to text icon. + * + * @param {string} name - file name + * @return {string} + * @public + */ + + FileIcons.prototype.getClassWithColor = function(name) { + var match = this.db.matchName(name) + return match ? match.getClass(0) : null + } + + return new FileIcons(icondb) +})) diff --git a/libs/fonts/devopicons.woff2 b/libs/fonts/devopicons.woff2 new file mode 100644 index 0000000..77635ab Binary files /dev/null and b/libs/fonts/devopicons.woff2 differ diff --git a/libs/fonts/file-icons.woff2 b/libs/fonts/file-icons.woff2 new file mode 100644 index 0000000..a3ad9c5 Binary files /dev/null and b/libs/fonts/file-icons.woff2 differ diff --git a/libs/fonts/fontawesome.woff2 b/libs/fonts/fontawesome.woff2 new file mode 100644 index 0000000..4d13fc6 Binary files /dev/null and b/libs/fonts/fontawesome.woff2 differ diff --git a/libs/fonts/mfixx.woff2 b/libs/fonts/mfixx.woff2 new file mode 100644 index 0000000..2ca718b Binary files /dev/null and b/libs/fonts/mfixx.woff2 differ diff --git a/libs/fonts/octicons.woff2 b/libs/fonts/octicons.woff2 new file mode 100644 index 0000000..69e7b2a Binary files /dev/null and b/libs/fonts/octicons.woff2 differ diff --git a/libs/jquery.js b/libs/jquery.js index eed1777..a0445d6 100644 --- a/libs/jquery.js +++ b/libs/jquery.js @@ -325,7 +325,12 @@ jQuery.extend({ } else { // Otherwise, avoid the DOM node creation, insertion // and removal by using an indirect global eval - indirect( code ); + try{ + indirect( code ); + } + catch(e){ + console.log(e) + } } } }, diff --git a/package.json b/package.json index e6c156b..bd4f8e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "octotree", - "version": "2.2.5", + "version": "2.4.3", "description": "Code tree for GitHub", "main": "inject.js", "scripts": { @@ -32,6 +32,7 @@ "gulp-babel": "^6.1.0", "gulp-clean": "^0.3.1", "gulp-concat": "*", + "gulp-crx-pack": "^1.0.1", "gulp-exit": "0.0.2", "gulp-less": "^1.3.1", "gulp-load-plugins": "^0.5.3", diff --git a/src/adapters/adapter.js b/src/adapters/adapter.js index 5183285..07a0055 100644 --- a/src/adapters/adapter.js +++ b/src/adapters/adapter.js @@ -1,383 +1,379 @@ class Adapter { - constructor(deps) { - deps.forEach(dep => window[dep]()) - this._defaultBranch = {} - } + constructor(deps, store) { + deps.forEach(dep => window[dep]()) + this._defaultBranch = {} + this.store = store + } - /** - * Loads the code tree of a repository. - * @param {Object} opts: { - * path: the starting path to load the tree, - * repo: the current repository, - * node (optional): the selected node (null to load entire tree), - * token (optional): the personal access token - * } - * @param {Function} transform(item) - * @param {Function} cb(err: error, tree: Array[Array|item]) - */ - _loadCodeTree(opts, transform, cb) { - const folders = { '': [] } - const $dummyDiv = $('
') - const {path, repo, node} = opts + /** + * Loads the code tree of a repository. + * @param {Object} opts: { + * path: the starting path to load the tree, + * repo: the current repository, + * node (optional): the selected node (null to load entire tree), + * token (optional): the personal access token + * } + * @param {Function} transform(item) + * @param {Function} cb(err: error, tree: Array[Array|item]) + * @api protected + */ + _loadCodeTreeInternal(opts, transform, cb) { + const folders = { '': [] } + const $dummyDiv = $('
') + const {path, repo, node} = opts - opts.encodedBranch = opts.encodedBranch || encodeURIComponent(decodeURIComponent(repo.branch)) + opts.encodedBranch = opts.encodedBranch || encodeURIComponent(decodeURIComponent(repo.branch)) - this._getTree(path, opts, (err, tree) => { - if (err) return cb(err) + this._getTree(path, opts, (err, tree) => { + if (err) return cb(err) - this._getSubmodules(tree, opts, (err, submodules) => { - if (err) return cb(err) + this._getSubmodules(tree, opts, (err, submodules) => { + if (err) return cb(err) - submodules = submodules || {} + submodules = submodules || {} - const nextChunk = (iteration = 0) => { - const CHUNK_SIZE = 300 + const nextChunk = (iteration = 0) => { + const CHUNK_SIZE = 300 - for (let i = 0; i < CHUNK_SIZE; i++) { - const item = tree[iteration * CHUNK_SIZE + i] + for (let i = 0; i < CHUNK_SIZE; i++) { + const item = tree[iteration * CHUNK_SIZE + i] - // we're done - if (item === undefined) { - return cb(null, folders['']) - } + // we're done + if (item === undefined) { + return cb(null, folders['']) + } - // runs transform requested by subclass - if (transform) { - transform(item) - } + // runs transform requested by subclass + if (transform) { + transform(item) + } - // if lazy load and has parent, prefix with parent path - if (node && node.path) { - item.path = node.path + '/' + item.path - } + // if lazy load and has parent, prefix with parent path + if (node && node.path) { + item.path = node.path + '/' + item.path + } - const path = item.path - const type = item.type - const index = path.lastIndexOf('/') - const name = $dummyDiv.text(path.substring(index + 1)).html() // sanitizes, closes #9 + const path = item.path + const type = item.type + const index = path.lastIndexOf('/') + const name = $dummyDiv.text(path.substring(index + 1)).html() // sanitizes, closes #9 - item.id = NODE_PREFIX + path - item.text = name - item.icon = type // uses `type` as class name for tree node + item.id = NODE_PREFIX + path + item.text = name - if (node) { - folders[''].push(item) - } else { - folders[path.substring(0, index)].push(item) - } + // uses `type` as class name for tree node + item.icon = type - if (type === 'tree' || type === 'blob') { - if (type === 'tree') { - if (node) - item.children = true - else - folders[item.path] = item.children = [] - } + // @ifdef SUPPORT_FILE_ICONS + if (type === 'blob') { + if (this.store.get(STORE.ICONS)) { + const className = FileIcons.getClassWithColor(name) + item.icon += ' ' + (className || 'file-generic') + } + else { + item.icon += ' file-generic' + } + } + // @endif - // encodes but retains the slashes, see #274 - const encodedPath = path.split('/').map(encodeURIComponent).join('/') - item.a_attr = { - href: this._getItemHref(repo, type, path) - } - } else if (type === 'commit') { - let moduleUrl = submodules[item.path] - if (moduleUrl) { // fixes #105 - // special handling for submodules hosted in GitHub - if (~moduleUrl.indexOf('github.com')) { - moduleUrl = moduleUrl.replace(/^git(:\/\/|@)/, window.location.protocol + '//') - .replace('github.com:', 'github.com/') - .replace(/.git$/, '') - item.text = `${name} - @ - ${item.sha.substr(0, 7)}` - } - item.a_attr = { href: moduleUrl } - } - } - } + // @ifndef SUPPORT_FILE_ICONS + item.icon += ' file-generic' + // @endif - setTimeout(() => nextChunk(iteration + 1)) - } + if (item.patch) { + let patch_html = '' - nextChunk() - }) - }) - } + switch (item.patch.action) { + case 'added': + patch_html += 'added' + break + case 'renamed': + patch_html += + `renamed` + break + case 'removed': + patch_html += + `removed` + break + default: + break + } - _handleError(jqXHR, cb) { - let error, message, needAuth + if (item.patch.filesChanged) { + const fileString = item.patch.filesChanged === 1 ? 'file' : 'files' + patch_html += `${item.patch.filesChanged} ${fileString}` + } - switch (jqXHR.status) { - case 0: - error = '连接错误' - message = - `无法连接到网站. 如果你的网络连接这个网站很好,也许有一个中断的API. 请稍后再试.` - needAuth = false - break - case 206: - error = '仓库太大' - message = - `这个仓库检索太大. 如果你经常使用这个库,去设置和取消“立即加载整个仓库”的选项.` - break - case 401: - error = '无效的token' - message = - `token是无效的.
- 点此 - 去创建一个access token并粘贴到下面.` - needAuth = true - break - case 409: - error = '空仓库' - message = '空仓库.' - break - case 404: - error = '私人仓库' - message = - `访问私有仓库需要access token.
- 点此链接 - 去创建一个access token并粘贴到下面.` - needAuth = true - break - case 403: - if (~jqXHR.getAllResponseHeaders().indexOf('X-RateLimit-Remaining: 0')) { - // It's kinda specific for GitHub - error = 'API超过限制' - message = - `你已经超过GitHub API小时限制和需要GitHub访问令牌进行额外的请求.
- 点此 - 去创建一个access token并粘贴到下面.` - needAuth = true - break + if (item.patch.additions !== 0) { + patch_html += `+${item.patch.additions}` + } + if (item.patch.deletions !== 0) { + patch_html += `-${item.patch.deletions}` + } + + item.text += `${patch_html}` + } + + if (node) { + folders[''].push(item) } else { - error = '禁止访问' - message = - `禁止访问. - 你可能需要提供 access token.
- 点此链接 - 去创建一个access token并粘贴到下面.` - needAuth = true - break + folders[path.substring(0, index)].push(item) } - default: - error = message = jqXHR.statusText - needAuth = false - break - } - cb({ - error: `错误信息: ${error}`, - message: message, - needAuth: needAuth - }) - } - /** - * Inits behaviors after the sidebar is added to the DOM. - * @api public - */ - init($sidebar) { - $sidebar - .resizable({ handles: 'e', minWidth: this.getMinWidth() }) - .addClass(this.getCssClass()) - } + if (type === 'tree' || type === 'blob') { + if (type === 'tree') { + if (node) + item.children = true + else + folders[item.path] = item.children = [] + } - /** - * Returns the CSS class to be added to the Octotree sidebar. - * @api protected - */ - getCssClass() { - throw new Error('没有实现的方法') - } - - /** - * Returns the minimum width acceptable for the sidebar. - * @api protected - */ - getMinWidth() { - return 200 - } - - /** - * Returns whether the adapter is capable of loading the entire tree in - * a single request. This is usually determined by the underlying the API. - * @api public - */ - canLoadEntireTree() { - return false - } - - /** - * Loads the code tree. - * @api public - */ - loadCodeTree(opts, cb) { - throw new Error('没有实现的方法') - } - - /** - * Returns the URL to create a personal access token. - * @api public - */ - getCreateTokenUrl() { - throw new Error('没有实现的方法') - } - - /** - * Updates the layout based on sidebar visibility and width. - * @api public - */ - updateLayout(togglerVisible, sidebarVisible, sidebarWidth) { - throw new Error('没有实现的方法') - } - - /** - * Returns repo info at the current path. - * @api public - */ - getRepoFromPath(showInNonCodePage, currentRepo, token, cb) { - throw new Error('没有实现的方法') - } - - /** - * Selects the file at a specific path. - * @api public - */ - selectFile(path) { - window.location.href = path - } - - /** - * Selects a submodule. - * @api public - */ - selectSubmodule(path) { - window.location.href = path - } - - /** - * Opens file or submodule in a new tab. - * @api public - */ - openInNewTab(path) { - window.open(path, '_blank').focus() - } - - /** - * Downloads a file. - * @api public - */ - downloadFile(path, fileName) { - const link = document.createElement('a') - link.setAttribute('href', path.replace(/\/blob\/|\/src\//, '/raw/')) - link.setAttribute('download', fileName) - link.click() - } - - /** - * Gets tree at path. - * @param {Object} opts - {token, repo} - * @api protected - */ - _getTree(path, opts, cb) { - throw new Error('没有实现的方法') - } - - /** - * Gets submodules in the tree. - * @param {Object} opts - {token, repo, encodedBranch} - * @api protected - */ - _getSubmodules(tree, opts, cb) { - throw new Error('没有实现的方法') - } - - /** - * Returns item's href value. - * @api protected - */ - _getItemHref(repo, type, encodedPath) { - return `/${repo.username}/${repo.reponame}/${type}/${repo.branch}/${encodedPath}` - } -} - - -class PjaxAdapter extends Adapter { - constructor() { - super(['jquery.pjax.js']) - - $.pjax.defaults.timeout = 0 // no timeout - $(document) - .on('pjax:send', () => $(document).trigger(EVENT.REQ_START)) - .on('pjax:end', () => $(document).trigger(EVENT.REQ_END)) - } - - - // @override - // @param {Object} opts - {pjaxContainer: the specified pjax container} - // @api public - init($sidebar, opts) { - super.init($sidebar) - - opts = opts || {} - const pjaxContainer = opts.pjaxContainer - - if (!window.MutationObserver) return - - // Some host switch pages using pjax. This observer detects if the pjax container - // has been updated with new contents and trigger layout. - const pageChangeObserver = new window.MutationObserver(() => { - // Trigger location change, can't just relayout as Octotree might need to - // hide/show depending on whether the current page is a code page or not. - return $(document).trigger(EVENT.LOC_CHANGE) - }) - - if (pjaxContainer) { - pageChangeObserver.observe(pjaxContainer, { - childList: true, - }) - } else { // Fall back if DOM has been changed - let firstLoad = true, href, hash - - function detectLocChange() { - if (location.href !== href || location.hash !== hash) { - href = location.href - hash = location.hash - - // If this is the first time this is called, no need to notify change as - // Octotree does its own initialization after loading options. - if (firstLoad) { - firstLoad = false - } else { - setTimeout(() => { - $(document).trigger(EVENT.LOC_CHANGE) - }, 300) // Wait a bit for pjax DOM change - } + // if item is part of a PR, jump to that file's diff + if (item.patch && typeof item.patch.diffId === 'number') { + const url = this._getPatchHref(repo, item.patch) + item.a_attr = { + href: url, + 'data-download-url': item.url, + 'data-download-filename': name, } - setTimeout(detectLocChange, 200) + } else { + // encodes but retains the slashes, see #274 + const encodedPath = path.split('/').map(encodeURIComponent).join('/') + const url = this._getItemHref(repo, type, encodedPath, opts.encodedBranch) + item.a_attr = { + href: url, + 'data-download-url': url, + 'data-download-filename': name, + } + } + } else if (type === 'commit') { + let moduleUrl = submodules[item.path] + if (moduleUrl) { // fixes #105 + // special handling for submodules hosted in GitHub + if (~moduleUrl.indexOf('github.com')) { + moduleUrl = moduleUrl.replace(/^git(:\/\/|@)/, window.location.protocol + '//') + .replace('github.com:', 'github.com/') + .replace(/.git$/, '') + item.text = `${name} + @ + ${item.sha.substr(0, 7)}` + } + item.a_attr = { href: moduleUrl } + } } + } - detectLocChange() + setTimeout(() => nextChunk(iteration + 1)) } + + nextChunk() + }) + }) + } + + /** + * Generic error handler. + * @api protected + */ + _handleError(jqXHR, cb) { + let error, message, needAuth + + switch (jqXHR.status) { + case 0: + error = '连接错误' + message = + `无法连接到网站. 如果你的网络连接这个网站很好,也许有一个中断的API. 请稍后再试.` + needAuth = false + break + case 206: + error = '仓库太大' + message = + `这个仓库检索太大. 如果你经常使用这个库,去设置和取消“立即加载整个仓库”的选项.` + break + case 401: + error = '无效的token' + message = + `token是无效的.
+ 点此 + 去创建一个access token并粘贴到下面.` + needAuth = true + break + case 409: + error = '空仓库' + message = '空仓库.' + break + case 404: + error = '私人仓库' + message = + `访问私有仓库需要access token.
+ 点此链接 + 去创建一个access token并粘贴到下面.` + needAuth = true + break + case 403: + if (~jqXHR.getAllResponseHeaders().indexOf('X-RateLimit-Remaining: 0')) { + // It's kinda specific for GitHub + error = 'API超过限制' + message = + `你已经超过GitHub API小时限制和需要GitHub访问令牌进行额外的请求.
+ 点此 + 去创建一个access token并粘贴到下面.` + needAuth = true + break + } else { + error = '禁止访问' + message = + `禁止访问. + 你可能需要提供 access token.
+ 点此链接 + 去创建一个access token并粘贴到下面.` + needAuth = true + break + } + default: + error = message = jqXHR.statusText + needAuth = false + break } + cb({ + error: `错误信息: ${error}`, + message: message, + needAuth: needAuth + }) + } + /** + * Returns the CSS class to be added to the Octotree sidebar. + * @api protected + */ + _getCssClass() { + throw new Error('没有实现的方法') + } - // @override - // @param {Object} opts - {$pjax_container: jQuery object} - // @api public - selectFile(path, opts) { - opts = opts || {} - const $pjaxContainer = opts.$pjaxContainer - const fragment = opts.fragment + /** + * Returns the minimum width acceptable for the sidebar. + * @api protected + */ + _getMinWidth() { + return 200 + } - if ($pjaxContainer.length) { - $.pjax({ - // needs full path for pjax to work with Firefox as per cross-domain-content setting - url: location.protocol + '//' + location.host + path, - container: $pjaxContainer, - fragment: fragment - }) - } else { // falls back - super.selectFile(path) - } - } -} + /** + * Inits behaviors after the sidebar is added to the DOM. + * @api public + */ + init($sidebar) { + $sidebar + .resizable({ handles: 'e', minWidth: this._getMinWidth() }) + .addClass(this._getCssClass()) + } + + /** + * Returns whether the adapter is capable of loading the entire tree in + * a single request. This is usually determined by the underlying the API. + * @api public + */ + canLoadEntireTree() { + return false + } + + /** + * Loads the code tree. + * @api public + */ + loadCodeTree(opts, cb) { + throw new Error('没有实现的方法') + } + + /** + * Returns the URL to create a personal access token. + * @api public + */ + getCreateTokenUrl() { + throw new Error('没有实现的方法') + } + + /** + * Updates the layout based on sidebar visibility and width. + * @api public + */ + updateLayout(togglerVisible, sidebarVisible, sidebarWidth) { + throw new Error('没有实现的方法') + } + + /** + * Returns repo info at the current path. + * @api public + */ + getRepoFromPath(token, cb) { + throw new Error('没有实现的方法') + } + + /** + * Selects the file at a specific path. + * @api public + */ + selectFile(path) { + window.location.href = path + } + + /** + * Selects a submodule. + * @api public + */ + selectSubmodule(path) { + window.location.href = path + } + + /** + * Opens file or submodule in a new tab. + * @api public + */ + openInNewTab(path) { + window.open(path, '_blank').focus() + } + + /** + * Downloads a file. + * @api public + */ + downloadFile(path, fileName) { + const link = document.createElement('a') + link.setAttribute('href', path.replace(/\/blob\/|\/src\//, '/raw/')) + link.setAttribute('download', fileName) + link.click() + } + + /** + * Gets tree at path. + * @param {Object} opts - {token, repo} + * @api protected + */ + _getTree(path, opts, cb) { + throw new Error('没有实现的方法') + } + + /** + * Gets submodules in the tree. + * @param {Object} opts - {token, repo, encodedBranch} + * @api protected + */ + _getSubmodules(tree, opts, cb) { + throw new Error('没有实现的方法') + } + + /** + * Returns item's href value. + * @api protected + */ + _getItemHref(repo, type, encodedPath, encodedBranch) { + return `/${repo.username}/${repo.reponame}/${type}/${encodedBranch}/${encodedPath}` + } + /** + * Returns patch's href value. + * @api protected + */ + _getPatchHref(repo, patch) { + return `/${repo.username}/${repo.reponame}/pull/${repo.pullNumber}/files#diff-${patch.diffId}` + } + } diff --git a/src/adapters/bitbucket.js b/src/adapters/bitbucket.js index f00be00..f76afea 100644 --- a/src/adapters/bitbucket.js +++ b/src/adapters/bitbucket.js @@ -9,10 +9,6 @@ const BB_PJAX_CONTAINER_SEL = '#source-container' class Bitbucket extends PjaxAdapter { - constructor() { - super(['jquery.pjax.js']) - } - // @override init($sidebar) { const pjaxContainer = $(BB_PJAX_CONTAINER_SEL)[0] @@ -20,7 +16,7 @@ class Bitbucket extends PjaxAdapter { } // @override - getCssClass() { + _getCssClass() { return 'octotree_bitbucket_sidebar' } @@ -37,7 +33,7 @@ class Bitbucket extends PjaxAdapter { } // @override - getRepoFromPath(showInNonCodePage, currentRepo, token, cb) { + getRepoFromPath(currentRepo, token, cb) { // 404 page, skip if ($(BB_404_SEL).length) { @@ -63,8 +59,8 @@ class Bitbucket extends PjaxAdapter { // Skip non-code page unless showInNonCodePage is true // with Bitbucket /username/repo is non-code page - if (!showInNonCodePage && - (!type || (type && type !== 'src'))) { + const showInNonCodePage = this.store.get(STORE.NONCODE) + if (!showInNonCodePage && (!type || (type && type !== 'src'))) { return cb() } @@ -102,7 +98,7 @@ class Bitbucket extends PjaxAdapter { // @override loadCodeTree(opts, cb) { opts.path = opts.node.path - this._loadCodeTree(opts, (item) => { + this._loadCodeTreeInternal(opts, (item) => { if (!item.type) { item.type = 'blob' } @@ -206,7 +202,7 @@ class Bitbucket extends PjaxAdapter { } // @override - _getItemHref(repo, type, encodedPath) { - return `/${repo.username}/${repo.reponame}/src/${repo.branch}/${encodedPath}` + _getItemHref(repo, type, encodedPath, encodedBranch) { + return `/${repo.username}/${repo.reponame}/src/${encodedBranch}/${encodedPath}` } } diff --git a/src/adapters/bitbucket.less b/src/adapters/bitbucket.less index cd2a873..3dc2ec3 100644 --- a/src/adapters/bitbucket.less +++ b/src/adapters/bitbucket.less @@ -95,7 +95,7 @@ content: '\f131'; color: #707070; } - .jstree-icon.blob:before { + .jstree-icon.file-generic:before { content: '\f12e'; color: #707070; } @@ -125,7 +125,7 @@ background: #e6e6e6; } } - .jstree-icon.tree, .jstree-icon.blob, .jstree-icon.commit { + .jstree-icon.tree, .jstree-icon.file-generic, .jstree-icon.commit { font: normal normal 16px 'Atlassian Icons'; } } diff --git a/src/adapters/github.js b/src/adapters/github.js index d94e863..4507acf 100644 --- a/src/adapters/github.js +++ b/src/adapters/github.js @@ -13,13 +13,13 @@ const GH_RESERVED_USER_NAMES = [ const GH_RESERVED_REPO_NAMES = ['followers', 'following', 'repositories'] const GH_404_SEL = '#parallax_wrapper' const GH_PJAX_CONTAINER_SEL = '#js-repo-pjax-container, .context-loader-container, [data-pjax-container]' -const GH_CONTAINERS = '.container, .container-responsive' +const GH_CONTAINERS = '.container, .container-lg, .container-responsive' const GH_RAW_CONTENT = 'body > pre' class GitHub extends PjaxAdapter { - constructor() { - super(['jquery.pjax.js']) + constructor(store) { + super(store) } // @override @@ -47,7 +47,7 @@ class GitHub extends PjaxAdapter { } // @override - getCssClass() { + _getCssClass() { return 'octotree_github_sidebar' } @@ -58,7 +58,7 @@ class GitHub extends PjaxAdapter { // @override getCreateTokenUrl() { - return `${location.protocol}//${location.host}/settings/tokens/new` + return `${location.protocol}//${location.host}/settings/tokens/new?scopes=repo&description=Octotree%20browser%20extension` } // @override @@ -73,7 +73,9 @@ class GitHub extends PjaxAdapter { } // @override - getRepoFromPath(showInNonCodePage, currentRepo, token, cb) { + getRepoFromPath(currentRepo, token, cb) { + const showInNonCodePage = this.store.get(STORE.NONCODE) + const showOnlyChangedInPR = this.store.get(STORE.PR) // 404 page, skip if ($(GH_404_SEL).length) { @@ -85,14 +87,16 @@ class GitHub extends PjaxAdapter { return cb() } - // (username)/(reponame)[/(type)] - const match = window.location.pathname.match(/([^\/]+)\/([^\/]+)(?:\/([^\/]+))?/) + // (username)/(reponame)[/(type)][/(typeId)] + const match = window.location.pathname.match(/([^\/]+)\/([^\/]+)(?:\/([^\/]+))?(?:\/([^\/]+))?/) if (!match) { return cb() } - const username = match[1] - const reponame = match[2] + let username = match[1] + let reponame = match[2] + let type = match[3] + let typeId = match[4] // Not a repository, skip if (~GH_RESERVED_USER_NAMES.indexOf(username) || @@ -100,8 +104,12 @@ class GitHub extends PjaxAdapter { return cb() } + // Check if this is a PR and whether we should show changes + const isPR = type === 'pull' + const pullNumber = isPR && showOnlyChangedInPR ? typeId : null + // Skip non-code page unless showInNonCodePage is true - if (!showInNonCodePage && match[3] && !~['tree', 'blob'].indexOf(match[3])) { + if (!showInNonCodePage && type && !~['tree', 'blob'].indexOf(type)) { return cb() } @@ -117,8 +125,7 @@ class GitHub extends PjaxAdapter { this._defaultBranch[username + '/' + reponame] // Still no luck, get default branch for real - const repo = {username: username, reponame: reponame, branch: branch} - + const repo = {username: username, reponame: reponame, branch: branch, pullNumber: pullNumber} if (repo.branch) { cb(null, repo) } @@ -142,17 +149,106 @@ class GitHub extends PjaxAdapter { opts.encodedBranch = encodeURIComponent(decodeURIComponent(opts.repo.branch)) opts.path = (opts.node && (opts.node.sha || opts.encodedBranch)) || (opts.encodedBranch + '?recursive=1') - this._loadCodeTree(opts, null, cb) + this._loadCodeTreeInternal(opts, null, cb) } // @override _getTree(path, opts, cb) { - this._get(`/git/trees/${path}`, opts, (err, res) => { - if (err) cb(err) - else cb(null, res.tree) - }) + if (opts.repo.pullNumber) { + this._getPatch(opts, cb) + } + else { + this._get(`/git/trees/${path}`, opts, (err, res) => { + // console.log('****', res.tree); + if (err) cb(err) + else cb(null, res.tree) + }) + } } + /** + * Get files that were patched in Pull Request. + * The diff map that is returned contains changed files, as well as the parents of the changed files. + * This allows the tree to be filtered for only folders that contain files with diffs. + * @param {Object} opts: { + * path: the starting path to load the tree, + * repo: the current repository, + * node (optional): the selected node (null to load entire tree), + * token (optional): the personal access token + * } + * @param {Function} cb(err: error, diffMap: Object) + */ + _getPatch(opts, cb) { + const {pullNumber} = opts.repo + + this._get(`/pulls/${pullNumber}/files?per_page=300`, opts, (err, res) => { + if (err) cb(err) + else { + const diffMap = {} + + res.forEach((file, index) => { + + // record file patch info + diffMap[file.filename] = { + type: 'blob', + diffId: index, + action: file.status, + additions: file.additions, + blob_url: file.blob_url, + deletions: file.deletions, + filename: file.filename, + path: file.path, + sha: file.sha + } + + // record ancestor folders + const folderPath = file.filename.split('/').slice(0, -1).join('/') + const split = folderPath.split('/') + + // aggregate metadata for ancestor folders + split.reduce((path, curr) => { + if (path.length) path = `${path}/${curr}` + else path = `${curr}` + + if (diffMap[path] == null) { + diffMap[path] = { + type: 'tree', + filename: path, + filesChanged: 1, + additions: file.additions, + deletions: file.deletions + } + } + else { + diffMap[path].additions += file.additions + diffMap[path].deletions += file.deletions + diffMap[path].filesChanged++ + } + return path + }, '') + }) + + // transform to emulate response from get `tree` + const tree = Object.keys(diffMap).map(fileName => { + const patch = diffMap[fileName] + return { + patch, + path: fileName, + sha: patch.sha, + type: patch.type, + url: patch.blob_url, + } + }) + + // sort by path, needs to be alphabetical order (so parent folders come before children) + // note: this is still part of the above transform to mimic the behavior of get tree + tree.sort((a, b) => a.path.localeCompare(b.path)) + + cb(null, tree) + } + }) + } + // @override _getSubmodules(tree, opts, cb) { const item = tree.filter((item) => /^\.gitmodules$/i.test(item.path))[0] diff --git a/src/adapters/github.less b/src/adapters/github.less index 71f1a5c..f6bfbdc 100644 --- a/src/adapters/github.less +++ b/src/adapters/github.less @@ -50,6 +50,25 @@ content: data-uri('image/svg+xml;charset=UTF-8', './octicons/question.svg'); } } + + input[type=text], textarea { + padding: 4px 8px; + color: #24292e; + background-color: #fafbfc; + border: 1px solid #d1d5da; + border-radius: 3px; + outline: none; + box-shadow: rgba(27, 31, 35, 0.075) 0px 1px 2px inset; + + &:focus { + border-color: #2188ff; + box-shadow: inset 0 1px 2px rgba(27,31,35,0.075), 0 0 0 0.2em rgba(3,102,214,0.3); + } + } + + textarea { + padding: 6px 8px; + } } .octotree_treeview { @@ -70,18 +89,21 @@ top: 2px; content: data-uri('image/svg+xml;charset=UTF-8', './octicons/git-branch.svg'); } - .jstree-icon { + .jstree-icon.tree, .jstree-icon.commit, .jstree-icon.blob.file-generic { margin-top: 3px; } .jstree-icon.tree:before { content: data-uri('image/svg+xml;charset=UTF-8', './octicons/file-directory.svg'); } - .jstree-icon.blob:before { + .jstree-icon.file-generic:before { content: data-uri('image/svg+xml;charset=UTF-8', './octicons/file-text.svg'); } .jstree-node.jstree-leaf:hover { - .jstree-icon.blob:before { - content: data-uri('image/svg+xml;charset=UTF-8', './octicons/cloud-download.svg'); + .jstree-icon.blob { + margin-top: 1px; + &:before { + content: data-uri('image/svg+xml;charset=UTF-8', './octicons/cloud-download.svg'); + } } } .jstree-icon.commit:before { @@ -101,6 +123,18 @@ background: #dbeeff; } } + + .patch { + display: none; + } + + .patch:last-of-type { + display: inline; + font-size: 80%; + span { + padding-left: 5px; + } + } } } diff --git a/src/adapters/octicons/cloud-download.svg b/src/adapters/octicons/cloud-download.svg index e0daf3d..98dad75 100644 --- a/src/adapters/octicons/cloud-download.svg +++ b/src/adapters/octicons/cloud-download.svg @@ -1,3 +1,3 @@ - + diff --git a/src/adapters/oschina.js b/src/adapters/oschina.js index be2e0d3..fc0c823 100644 --- a/src/adapters/oschina.js +++ b/src/adapters/oschina.js @@ -7,187 +7,189 @@ const OSC_RAW_CONTENT = 'body > pre' class Oschina extends PjaxAdapter { - constructor() { - super(['jquery.pjax.js']) + constructor(store) { + super(store) + } + + // @override + init($sidebar) { + const pjaxContainer = $(OSC_PJAX_CONTAINER_SEL)[0] + super.init($sidebar, { 'pjaxContainer': pjaxContainer }) + + // Fix #151 by detecting when page layout is updated. + // In this case, split-diff page has a wider layout, so need to recompute margin. + // Note that couldn't do this in response to URL change, since new DOM via pjax might not be ready. + const diffModeObserver = new window.MutationObserver((mutations) => { + mutations.forEach((mutation) => { + if (~mutation.oldValue.indexOf('split-diff') || + ~mutation.target.className.indexOf('split-diff')) { + return $(document).trigger(EVENT.LAYOUT_CHANGE) + } + }) + }) + + diffModeObserver.observe(document.body, { + attributes: true, + attributeFilter: ['class'], + attributeOldValue: true + }) + } + + // @override + _getCssClass() { + return 'octotree_oschina_sidebar' + } + + // @override + canLoadEntireTree() { + return true + } + + // @override + getCreateTokenUrl() { + return `https://gitee.com/api/v5/swagger` + } + + // @override + updateLayout(togglerVisible, sidebarVisible, sidebarWidth) { + const SPACING = 232 + const $containers = $(OSC_CONTAINERS) + const autoMarginLeft = ($(document).width() - $containers.width()) / 2 + const WIDTH = $(document).width() - SPACING + const shouldPushLeft = sidebarVisible && (autoMarginLeft <= sidebarWidth + SPACING) + + $('html').css('margin-left', shouldPushLeft ? sidebarWidth : '') + $containers.css('margin-left', shouldPushLeft ? SPACING : '') + $containers.css('width', shouldPushLeft ? WIDTH : '') + // $(".ui.right.floated.horizontal.list").css('margin-right', shouldPushLeft ? 210 : '') + $(".git-project-download-panel").css('margin-right', shouldPushLeft ? 240 : '') + } + + // @override + getRepoFromPath(currentRepo, token, cb) { + const showInNonCodePage = this.store.get(STORE.NONCODE) + + // 404 page, skip + if ($(OSC_404_SEL).length) { + return cb() } - // @override - init($sidebar) { - const pjaxContainer = $(OSC_PJAX_CONTAINER_SEL)[0] - super.init($sidebar, { 'pjaxContainer': pjaxContainer }) + // Skip raw page + if ($(OSC_RAW_CONTENT).length) { + return cb() + } - // Fix #151 by detecting when page layout is updated. - // In this case, split-diff page has a wider layout, so need to recompute margin. - // Note that couldn't do this in response to URL change, since new DOM via pjax might not be ready. - const diffModeObserver = new window.MutationObserver((mutations) => { - mutations.forEach((mutation) => { - if (~mutation.oldValue.indexOf('split-diff') || - ~mutation.target.className.indexOf('split-diff')) { - return $(document).trigger(EVENT.LAYOUT_CHANGE) - } - }) + // (username)/(reponame)[/(type)] + const match = window.location.pathname.match(/([^\/]+)\/([^\/]+)(?:\/([^\/]+))?/) + if (!match) { + return cb() + } + + const username = match[1] + const reponame = match[2] + + // Not a repository, skip + if (~OSC_RESERVED_USER_NAMES.indexOf(username) || + ~OSC_RESERVED_REPO_NAMES.indexOf(reponame)) { + return cb() + } + + // Skip non-code page unless showInNonCodePage is true + if (!showInNonCodePage && match[3] && !~['tree', 'blob'].indexOf(match[3])) { + return cb() + } + + // Get branch by inspecting page, quite fragile so provide multiple fallbacks + const branch = + // Code page + $('#git-project-branch .text').text().trim() || + // Pull requests page + ($('.commit-ref.base-ref').attr('title') || ':').match(/:(.*)/)[1] || + // Reuse last selected branch if exist + (currentRepo.username === username && currentRepo.reponame === reponame && currentRepo.branch) || + // Get default branch from cache + this._defaultBranch[username + '/' + reponame] + + // Still no luck, get default branch for real + const repo = { username: username, reponame: reponame, branch: branch } + + if (repo.branch) { + cb(null, repo) + } else { + this._get(null, { repo, token }, (err, data) => { + if (err) return cb(err) + repo.branch = this._defaultBranch[username + '/' + reponame] = data.default_branch || 'master' + cb(null, repo) + }) + } + } + + // @override + selectFile(path) { + console.log('select file: ' + path) + const $pjaxContainer = $(OSC_PJAX_CONTAINER_SEL) + super.selectFile(path, { '$pjaxContainer': $pjaxContainer, fragment: OSC_PJAX_CONTAINER_SEL }) + } + + // @override + loadCodeTree(opts, cb) { + opts.encodedBranch = encodeURIComponent(decodeURIComponent(opts.repo.branch)) + opts.path = (opts.node && (opts.node.sha || opts.encodedBranch)) || + (opts.encodedBranch + '?recursive=1') + this._loadCodeTreeInternal(opts, null, cb) + } + + // @override + _getTree(path, opts, cb) { + this._get(`/git/trees/${path}`, opts, (err, res) => { + if (err) cb(err) + else cb(null, res.tree) + }) + } + + // @override + _getSubmodules(tree, opts, cb) { + cb() + // const item = tree.filter((item) => /^\.gitmodules$/i.test(item.path))[0] + // if (!item) return cb() + // this._get(`/git/blobs/${item.sha}`, opts, (err, res) => { + // if (err) return cb(err) + // const data = atob(res.content.replace(/\n/g, '')) + // cb(null, parseGitmodules(data)) + // }) + } + + _get(path, opts, cb) { + const host = location.protocol + '//' + location.host + var url = `${host}/api/v5/repos/${opts.repo.username}/${opts.repo.reponame}${path || ''}` + var request = (retry) => { + if (!retry && opts.token) { + url += (url.indexOf("?") >= 0 ? "&" : "?") + `access_token=${opts.token}` + } + const cfg = { + url, + method: 'GET', + cache: false, + xhrFields: { + withCredentials: true + }, + } + + $.ajax(cfg) + .done((data) => { + if (path && path.indexOf('/git/trees') === 0 && data.truncated) { + this._handleError({ status: 206 }, cb) + } + else cb(null, data) }) - - diffModeObserver.observe(document.body, { - attributes: true, - attributeFilter: ['class'], - attributeOldValue: true + .fail((jqXHR) => { + if (retry) { + request(false) + } else { + this._handleError(jqXHR, cb) + } }) } - - // @override - getCssClass() { - return 'octotree_oschina_sidebar' - } - - // @override - canLoadEntireTree() { - return true - } - - // @override - getCreateTokenUrl() { - return `https://gitee.com/api/v5/swagger` - } - - // @override - updateLayout(togglerVisible, sidebarVisible, sidebarWidth) { - const SPACING = 232 - const $containers = $(OSC_CONTAINERS) - const autoMarginLeft = ($(document).width() - $containers.width()) / 2 - const WIDTH = $(document).width() - SPACING - const shouldPushLeft = sidebarVisible && (autoMarginLeft <= sidebarWidth + SPACING) - - $('html').css('margin-left', shouldPushLeft ? sidebarWidth : '') - $containers.css('margin-left', shouldPushLeft ? SPACING : '') - $containers.css('width', shouldPushLeft ? WIDTH : '') - // $(".ui.right.floated.horizontal.list").css('margin-right', shouldPushLeft ? 210 : '') - $(".git-project-download-panel").css('margin-right', shouldPushLeft ? 240 : '') - } - - // @override - getRepoFromPath(showInNonCodePage, currentRepo, token, cb) { - - // 404 page, skip - if ($(OSC_404_SEL).length) { - return cb() - } - - // Skip raw page - if ($(OSC_RAW_CONTENT).length) { - return cb() - } - - // (username)/(reponame)[/(type)] - const match = window.location.pathname.match(/([^\/]+)\/([^\/]+)(?:\/([^\/]+))?/) - if (!match) { - return cb() - } - - const username = match[1] - const reponame = match[2] - - // Not a repository, skip - if (~OSC_RESERVED_USER_NAMES.indexOf(username) || - ~OSC_RESERVED_REPO_NAMES.indexOf(reponame)) { - return cb() - } - - // Skip non-code page unless showInNonCodePage is true - if (!showInNonCodePage && match[3] && !~['tree', 'blob'].indexOf(match[3])) { - return cb() - } - - // Get branch by inspecting page, quite fragile so provide multiple fallbacks - const branch = - // Code page - $('#git-project-branch .text').text().trim() || - // Pull requests page - ($('.commit-ref.base-ref').attr('title') || ':').match(/:(.*)/)[1] || - // Reuse last selected branch if exist - (currentRepo.username === username && currentRepo.reponame === reponame && currentRepo.branch) || - // Get default branch from cache - this._defaultBranch[username + '/' + reponame] - - // Still no luck, get default branch for real - const repo = { username: username, reponame: reponame, branch: branch } - - if (repo.branch) { - cb(null, repo) - } else { - this._get(null, { repo, token }, (err, data) => { - if (err) return cb(err) - repo.branch = this._defaultBranch[username + '/' + reponame] = data.default_branch || 'master' - cb(null, repo) - }) - } - } - - // @override - selectFile(path) { - const $pjaxContainer = $(OSC_PJAX_CONTAINER_SEL) - super.selectFile(path, { '$pjaxContainer': $pjaxContainer, fragment: OSC_PJAX_CONTAINER_SEL }) - } - - // @override - loadCodeTree(opts, cb) { - opts.encodedBranch = encodeURIComponent(decodeURIComponent(opts.repo.branch)) - opts.path = (opts.node && (opts.node.sha || opts.encodedBranch)) || - (opts.encodedBranch + '?recursive=1') - this._loadCodeTree(opts, null, cb) - } - - // @override - _getTree(path, opts, cb) { - this._get(`/git/trees/${path}`, opts, (err, res) => { - if (err) cb(err) - else cb(null, res.tree) - }) - } - - // @override - _getSubmodules(tree, opts, cb) { - cb() - // const item = tree.filter((item) => /^\.gitmodules$/i.test(item.path))[0] - // if (!item) return cb() - // this._get(`/git/blobs/${item.sha}`, opts, (err, res) => { - // if (err) return cb(err) - // const data = atob(res.content.replace(/\n/g, '')) - // cb(null, parseGitmodules(data)) - // }) - } - - _get(path, opts, cb) { - const host = location.protocol + '//' + location.host - var url = `${host}/api/v5/repos/${opts.repo.username}/${opts.repo.reponame}${path || ''}` - var request = (retry) => { - if (!retry && opts.token) { - url += (url.indexOf("?") >= 0 ? "&" : "?") + `access_token=${opts.token}` - } - const cfg = { - url, - method: 'GET', - cache: false, - xhrFields: { - withCredentials: true - }, - } - - $.ajax(cfg) - .done((data) => { - if (path && path.indexOf('/git/trees') === 0 && data.truncated) { - this._handleError({ status: 206 }, cb) - } - else cb(null, data) - }) - .fail((jqXHR) => { - if (retry) { - request(false) - } else { - this._handleError(jqXHR, cb) - } - }) - } - request(true) - } + request(true) + } } diff --git a/src/adapters/pjax.js b/src/adapters/pjax.js new file mode 100644 index 0000000..9278cda --- /dev/null +++ b/src/adapters/pjax.js @@ -0,0 +1,87 @@ +class PjaxAdapter extends Adapter { + constructor(store) { + super(['jquery.pjax.js'], store) + + $.pjax.defaults.timeout = 0 // no timeout + $(document) + .on('pjax:send', () => $(document).trigger(EVENT.REQ_START)) + .on('pjax:end', () => $(document).trigger(EVENT.REQ_END)) + } + + // @override + // @param {Object} opts - {pjaxContainer: the specified pjax container} + // @api public + init($sidebar, opts) { + super.init($sidebar) + + opts = opts || {} + const pjaxContainer = opts.pjaxContainer + + if (!window.MutationObserver) return + + // Some host switch pages using pjax. This observer detects if the pjax container + // has been updated with new contents and trigger layout. + const pageChangeObserver = new window.MutationObserver(() => { + // Trigger location change, can't just relayout as Octotree might need to + // hide/show depending on whether the current page is a code page or not. + return $(document).trigger(EVENT.LOC_CHANGE) + }) + + if (pjaxContainer) { + pageChangeObserver.observe(pjaxContainer, { + childList: true, + }) + } + else { // Fall back if DOM has been changed + let firstLoad = true, href, hash + + function detectLocChange() { + if (location.href !== href || location.hash !== hash) { + href = location.href + hash = location.hash + + // If this is the first time this is called, no need to notify change as + // Octotree does its own initialization after loading options. + if (firstLoad) { + firstLoad = false + } + else { + setTimeout(() => { + $(document).trigger(EVENT.LOC_CHANGE) + }, 300) // Wait a bit for pjax DOM change + } + } + setTimeout(detectLocChange, 200) + } + + detectLocChange() + } + } + + // @override + // @param {Object} opts - {$pjax_container: jQuery object} + // @api public + selectFile(path, opts) { + opts = opts || {} + const $pjaxContainer = opts.$pjaxContainer + const fragment = opts.fragment + + // if we're on the same page and just navigating to a different anchor + // don't bother fetching the page with pjax + const pathWithoutAnchor = path.replace(/#.*$/, '') + const isSamePage = location.pathname === pathWithoutAnchor + const loadWithPjax = $pjaxContainer.length && !isSamePage + + if (loadWithPjax) { + $.pjax({ + // needs full path for pjax to work with Firefox as per cross-domain-content setting + url: location.protocol + '//' + location.host + path, + container: $pjaxContainer, + fragment: fragment + }) + } + else { + super.selectFile(path) + } + } +} diff --git a/src/config/chrome/background.js b/src/config/chrome/background.js index 13b4487..ebdfbda 100644 --- a/src/config/chrome/background.js +++ b/src/config/chrome/background.js @@ -1,93 +1,97 @@ chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { - if (changeInfo.status !== 'loading') return + if (changeInfo.status !== 'loading') return - chrome.tabs.executeScript(tabId, { - code: 'var injected = window.octotreeInjected; window.octotreeInjected = true; injected;', - runAt: 'document_start' - }, (res) => { - if (chrome.runtime.lastError || // don't continue if error (i.e. page isn't in permission list) - res[0]) // value of `injected` above: don't inject twice - return + chrome.tabs.executeScript(tabId, { + code: 'var injected = window.octotreeInjected; window.octotreeInjected = true; injected;', + runAt: 'document_start' + }, (res) => { + if (chrome.runtime.lastError || // don't continue if error (i.e. page isn't in permission list) + res[0]) // value of `injected` above: don't inject twice + return - const cssFiles = [ - 'jstree.css', - 'octotree.css' - ] + const cssFiles = [ + 'jstree.css', + 'file-icons.css', + 'octotree.css' + ] - const jsFiles = [ - 'jquery.js', - 'jquery-ui.js', - 'jstree.js', - 'keymaster.js', - 'ondemand.js', - 'octotree.js' - ] + const jsFiles = [ + 'file-icons.js', + 'jquery.js', + 'jquery-ui.js', + 'jstree.js', + 'keymaster.js', + 'ondemand.js', + 'octotree.js' + ] - eachTask([ - (cb) => eachItem(cssFiles, inject('insertCSS'), cb), - (cb) => eachItem(jsFiles, inject('executeScript'), cb) - ]) + eachTask([ + (cb) => eachItem(cssFiles, inject('insertCSS'), cb), + (cb) => eachItem(jsFiles, inject('executeScript'), cb) + ]) - function inject(fn) { - return (file, cb) => { - chrome.tabs[fn](tabId, { file: file, runAt: 'document_start' }, cb) - } - } - }) + function inject(fn) { + return (file, cb) => { + chrome.tabs[fn](tabId, { file: file, runAt: 'document_start' }, cb) + } + } + }) }) chrome.runtime.onMessage.addListener((req, sender, sendRes) => { - const handler = { - requestPermissions: () => { - const urls = (req.urls || []) - .filter((url) => url.trim() !== '') - .map((url) => { - if (url.slice(-2) === '/*') return url - if (url.slice(-1) === '/') return url + '*' - return url + '/*' - }) + const handler = { + requestPermissions: () => { + const urls = (req.urls || []) + .filter((url) => url.trim() !== '') + .map((url) => { + if (url.slice(-2) === '/*') return url + if (url.slice(-1) === '/') return url + '*' + return url + '/*' + }) - if (urls.length === 0) { - sendRes(true) - removeUnnecessaryPermissions() - } else { - chrome.permissions.request({ origins: urls }, (granted) => { - sendRes(granted) - removeUnnecessaryPermissions() - }) - } - return true + if (urls.length === 0) { + sendRes(true) + removeUnnecessaryPermissions() + } + else { + chrome.permissions.request({ origins: urls }, (granted) => { + sendRes(granted) + removeUnnecessaryPermissions() + }) + } + return true - function removeUnnecessaryPermissions() { - const whitelist = urls.concat([ - 'https://github.com/*' - ]) - chrome.permissions.getAll((permissions) => { - const toBeRemovedUrls = permissions.origins.filter((url) => { - return !~whitelist.indexOf(url) - }) + function removeUnnecessaryPermissions() { + const whitelist = urls.concat([ + 'https://github.com/*', + 'https://bitbucket.org/*' + ]) + chrome.permissions.getAll((permissions) => { + const toBeRemovedUrls = permissions.origins.filter((url) => { + return !~whitelist.indexOf(url) + }) - if (toBeRemovedUrls.length) { - chrome.permissions.remove({ origins: toBeRemovedUrls }) - } - }) - } - } + if (toBeRemovedUrls.length) { + chrome.permissions.remove({ origins: toBeRemovedUrls }) + } + }) + } } + } - return handler[req.type]() + return handler[req.type]() }) function eachTask(tasks, done) { - (function next(index = 0) { - if (index === tasks.length) done && done() - else tasks[index](() => next(++index)) - })() + (function next(index = 0) { + if (index === tasks.length) done && done() + else tasks[index](() => next(++index)) + })() } function eachItem(arr, iter, done) { - const tasks = arr.map((item) => { - return (cb) => iter(item, cb) - }) - return eachTask(tasks, done) + const tasks = arr.map((item) => { + return (cb) => iter(item, cb) + }) + return eachTask(tasks, done) } diff --git a/src/config/chrome/manifest.json b/src/config/chrome/manifest.json index 2e6b029..b39df81 100755 --- a/src/config/chrome/manifest.json +++ b/src/config/chrome/manifest.json @@ -3,27 +3,26 @@ "version": "$VERSION", "manifest_version": 2, "author": "inu1255", - "description": "基于octotree的[码云](http://gitee.com)文件树插件", - "homepage_url": "http://git.oschina.net/inu1255/GitCodeTree", + "description": "基于 Octotree 的[码云](http://gitee.com)文件树插件", + "homepage_url": "https://gitee.com/inu1255/GitCodeTree", "icons": { "128": "icons/icon128.png" }, "permissions": [ - "https://bitbucket.org/*", "https://github.com/*", "http://git.oschina.net/*", "https://git.oschina.net/*", "http://gitee.com/*", "https://gitee.com/*", + "https://bitbucket.org/*", "storage" ], "optional_permissions": [ "" ], + "web_accessible_resources": ["*.woff2"], "background": { - "scripts": [ - "background.js" - ], + "scripts": ["background.js"], "persistent": false } } diff --git a/src/config/firefox/firefox.js b/src/config/firefox/firefox.js deleted file mode 100644 index 4fdbf9a..0000000 --- a/src/config/firefox/firefox.js +++ /dev/null @@ -1,17 +0,0 @@ -const data = require('sdk/self').data -const pageMod = require('sdk/page-mod') - -pageMod.PageMod({ - include: ['https://bitbucket.org/*', 'https://github.com/*', 'https://git.oschina.com/*', 'https://gitee.com/*'], - contentScriptFile: [data.url('jquery.js'), - data.url('jquery-ui.js'), - data.url('jstree.js'), - data.url('keymaster.js'), - data.url('ondemand.js'), - data.url('octotree.js') - ], - contentStyleFile: [data.url('jstree.css'), - data.url('octotree.css') - ], - contentScriptWhen: 'start' -}) diff --git a/src/config/firefox/manifest.json b/src/config/firefox/manifest.json new file mode 100755 index 0000000..ef47340 --- /dev/null +++ b/src/config/firefox/manifest.json @@ -0,0 +1,40 @@ +{ + "name": "Octotree", + "version": "$VERSION", + "manifest_version": 2, + "author": "inu1255", + "description": "基于 Octotree 的[码云](http://gitee.com)文件树插件", + "homepage_url": "https://gitee.com/inu1255/GitCodeTree", + "icons": { + "48": "icons/icon48.png", + "64": "icons/icon64.png" + }, + "permissions": [ + "https://*.github.com/*", + "https://*.bitbucket.org/*", + "storage" + ], + "web_accessible_resources": ["*.woff2"], + "content_scripts": [ + { + "matches": [ + "https://github.com/*", + "https://bitbucket.org/*" + ], + "js": [ + "file-icons.js", + "jquery.js", + "jquery-ui.js", + "jstree.js", + "keymaster.js", + "ondemand.js", + "octotree.js" + ], + "css": [ + "file-icons.css", + "jstree.css", + "octotree.css" + ] + } + ] +} diff --git a/src/config/firefox/package.json b/src/config/firefox/package.json deleted file mode 100644 index 61d8ea6..0000000 --- a/src/config/firefox/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "GitCodeTree", - "title": "GitCodeTree", - "id": "929909260@qq.com", - "description": "基于octotree的[码云](http://gitee.com)文件树插件", - "author": "inu1255", - "homepage": "http://git.oschina.net/inu1255/GitCodeTree", - "main": "lib/firefox", - "icon": "resource://jid1-Om7eJGwA1U8Akg-at-jetpack/data/icons/icon48.png", - "icon64": "resource://jid1-Om7eJGwA1U8Akg-at-jetpack/data/icons/icon64.png", - "license": "MIT", - "version": "$VERSION", - "permissions": { - "cross-domain-content": [ - "https://api.bitbucket.org", - "https://api.github.com", - "https://bitbucket.org", - "https://git.oschina.net", - "https://gitee.com", - "https://github.com" - ], - "private-browsing": true, - "multiprocess": true - } -} diff --git a/src/config/safari/Info.plist b/src/config/safari/Info.plist index 439cd1a..de42024 100755 --- a/src/config/safari/Info.plist +++ b/src/config/safari/Info.plist @@ -48,7 +48,7 @@ Description - 基于octotree的[码云](http://git.oschina.net)文件树插件 + 基于 Octotree 的[码云](http://git.oschina.net)文件树插件 ExtensionInfoDictionaryVersion 1.0 Permissions diff --git a/src/constants.js b/src/constants.js index 39e40df..33d8a6b 100644 --- a/src/constants.js +++ b/src/constants.js @@ -6,7 +6,9 @@ const STORE = { TOKEN : 'octotree.access_token', REMEMBER : 'octotree.remember', NONCODE : 'octotree.noncode_shown', + PR : 'octotree.pr_shown', HOTKEYS : 'octotree.hotkeys', + ICONS : 'octotree.icons', LOADALL : 'octotree.loadall', POPUP : 'octotree.popup_shown', WIDTH : 'octotree.sidebar_width', @@ -19,8 +21,10 @@ const DEFAULTS = { TOKEN : '', REMEMBER : true, NONCODE : true, + PR : true, LOADALL : true, HOTKEYS : '⌘+⇧+s, ⌃+⇧+s', + ICONS : true, POPUP : false, WIDTH : 232, SHOWN : false, diff --git a/src/octotree.js b/src/octotree.js index c4b9a94..2464f24 100755 --- a/src/octotree.js +++ b/src/octotree.js @@ -1,201 +1,199 @@ $(document).ready(() => { - const store = new Storage() + const store = new Storage() - parallel(Object.keys(STORE), setDefault, loadExtension) + parallel(Object.keys(STORE), setDefault, loadExtension) - function setDefault(key, cb) { - const storeKey = STORE[key] - store.get(storeKey, (val) => { - store.set(storeKey, val == null ? DEFAULTS[key] : val, cb) + function setDefault(key, cb) { + const storeKey = STORE[key] + store.get(storeKey, (val) => { + store.set(storeKey, val == null ? DEFAULTS[key] : val, cb) + }) + } + + function createAdapter() { + const normalizeUrl = (url) => url.replace(/(.*?:\/\/[^/]+)(.*)/, '$1') + + const githubUrls = store.get(STORE.GHEURLS).split(/\n/) + .map(normalizeUrl) + .concat('https://github.com') + + const bitbucketUrls = ['https://bitbucket.org'] + const oschinaUrls = [ + 'http://git.oschina.net', 'https://git.oschina.net', + 'http://gitee.com', 'https://gitee.com' + ] + const currentUrl = `${location.protocol}//${location.host}` + + if (~oschinaUrls.indexOf(currentUrl)) { + return new Oschina(store) + } else if (~githubUrls.indexOf(currentUrl)) { + return new GitHub(store) + } else if (~bitbucketUrls.indexOf(currentUrl)) { + return new Bitbucket(store) + } + } + + function loadExtension() { + const $html = $('html') + const $document = $(document) + const $dom = $(TEMPLATE) + const $sidebar = $dom.find('.octotree_sidebar') + const $toggler = $sidebar.find('.octotree_toggle') + const $views = $sidebar.find('.octotree_view') + const adapter = createAdapter() + const treeView = new TreeView($dom, store, adapter) + const optsView = new OptionsView($dom, store) + const helpPopup = new HelpPopup($dom, store) + const errorView = new ErrorView($dom, store) + let currRepo = false + let hasError = false + + $html.addClass(ADDON_CLASS) + + $(window).resize((event) => { + if (event.target === window) layoutChanged() + }) + + $toggler.click(toggleSidebarAndSave) + key.filter = () => $toggler.is(':visible') + key(store.get(STORE.HOTKEYS), toggleSidebarAndSave) + + const views = [treeView, errorView, optsView] + views.forEach((view) => { + $(view) + .on(EVENT.VIEW_READY, function (event) { + if (this !== optsView) { + $document.trigger(EVENT.REQ_END) + } + showView(this.$view) }) + .on(EVENT.VIEW_CLOSE, () => showView(hasError ? errorView.$view : treeView.$view)) + .on(EVENT.OPTS_CHANGE, optionsChanged) + .on(EVENT.FETCH_ERROR, (event, err) => showError(err)) + }) + + $document + .on(EVENT.REQ_START, () => $toggler.addClass('octotree_loading')) + .on(EVENT.REQ_END, () => $toggler.removeClass('octotree_loading')) + .on(EVENT.LAYOUT_CHANGE, layoutChanged) + .on(EVENT.TOGGLE, layoutChanged) + .on(EVENT.LOC_CHANGE, () => tryLoadRepo()) + + $sidebar + .width(parseInt(store.get(STORE.WIDTH))) + .resize(() => layoutChanged(true)) + .appendTo($('body')) + + adapter.init($sidebar) + return tryLoadRepo() + + function optionsChanged(event, changes) { + let reload = false + + Object.keys(changes).forEach((storeKey) => { + const value = changes[storeKey] + + switch (storeKey) { + case STORE.TOKEN: + case STORE.LOADALL: + case STORE.ICONS: + reload = true + break + case STORE.HOTKEYS: + key.unbind(value[0]) + key(value[1], toggleSidebar) + break + } + }) + + if (reload) { + tryLoadRepo(true) + } } - function createAdapter() { - const normalizeUrl = (url) => url.replace(/(.*?:\/\/[^/]+)(.*)/, '$1') + function tryLoadRepo(reload) { + hasError = false + const remember = store.get(STORE.REMEMBER) + const shown = store.get(STORE.SHOWN) + const token = store.get(STORE.TOKEN) - const githubUrls = store.get(STORE.GHEURLS).split(/\n/) - .map(normalizeUrl) - .concat('https://github.com') - - const bitbucketUrls = ['https://bitbucket.org'] - const oschinaUrls = ['http://git.oschina.net', 'https://git.oschina.net', 'http://gitee.com', 'https://gitee.com'] - const currentUrl = `${location.protocol}//${location.host}` - - if (oschinaUrls.indexOf(currentUrl) >= 0) { - return new Oschina(store) - } else if (~githubUrls.indexOf(currentUrl)) { - return new GitHub(store) - } else if (~bitbucketUrls.indexOf(currentUrl)) { - return new Bitbucket(store) + adapter.getRepoFromPath(currRepo, token, (err, repo) => { + if (err) { + showError(err) } - } + else if (repo) { + $toggler.show() - function loadExtension() { - const $html = $('html') - const $document = $(document) - const $dom = $(TEMPLATE) - const $sidebar = $dom.find('.octotree_sidebar') - const $toggler = $sidebar.find('.octotree_toggle') - const $views = $sidebar.find('.octotree_view') - const adapter = createAdapter() - const treeView = new TreeView($dom, store, adapter) - const optsView = new OptionsView($dom, store) - const helpPopup = new HelpPopup($dom, store) - const errorView = new ErrorView($dom, store) - let currRepo = false - let hasError = false + if (remember && shown) { + toggleSidebar(true) + } - $html.addClass(ADDON_CLASS) - - $(window).resize((event) => { - if (event.target === window) layoutChanged() - }) - - $toggler.click(toggleSidebarAndSave) - key.filter = () => $toggler.is(':visible') - key(store.get(STORE.HOTKEYS), toggleSidebarAndSave) - - const views = [treeView, errorView, optsView] - views.forEach((view) => { - $(view) - .on(EVENT.VIEW_READY, function(event) { - if (this !== optsView) { - $document.trigger(EVENT.REQ_END) - } - showView(this.$view) - }) - .on(EVENT.VIEW_CLOSE, () => showView(hasError ? errorView.$view : treeView.$view)) - .on(EVENT.OPTS_CHANGE, optionsChanged) - .on(EVENT.FETCH_ERROR, (event, err) => showError(err)) - }) - - $document - .on(EVENT.REQ_START, () => $toggler.addClass('octotree_loading')) - .on(EVENT.REQ_END, () => $toggler.removeClass('octotree_loading')) - .on(EVENT.LAYOUT_CHANGE, layoutChanged) - .on(EVENT.TOGGLE, layoutChanged) - .on(EVENT.LOC_CHANGE, () => tryLoadRepo()) - - $sidebar - .width(parseInt(store.get(STORE.WIDTH))) - .resize(layoutChanged) - .appendTo($('body')) - - var prev = location.href - function aa() { - setTimeout(function() { - if (prev != location.href) { - tryLoadRepo() - prev = location.href - } - aa() - }, 500) - } - aa() - adapter.init($sidebar) - return tryLoadRepo() - - function optionsChanged(event, changes) { - let reload = false - - Object.keys(changes).forEach((storeKey) => { - const value = changes[storeKey] - switch (storeKey) { - case STORE.TOKEN: - case STORE.LOADALL: - reload = true - break - case STORE.HOTKEYS: - key.unbind(value[0]) - key(value[1], toggleSidebar) - break - } - }) - - if (reload) { - tryLoadRepo(true) + if (isSidebarVisible()) { + const replacer = ['username', 'reponame', 'branch', 'pullNumber'] + const repoChanged = JSON.stringify(repo, replacer) !== JSON.stringify(currRepo, replacer) + if (repoChanged || reload === true) { + $document.trigger(EVENT.REQ_START) + currRepo = repo + treeView.show(repo, token) } - } - - function tryLoadRepo(reload) { - hasError = false - const remember = store.get(STORE.REMEMBER) - const showInNonCodePage = store.get(STORE.NONCODE) - const shown = store.get(STORE.SHOWN) - const token = store.get(STORE.TOKEN) - - adapter.getRepoFromPath(showInNonCodePage, currRepo, token, (err, repo) => { - if (err) { - showError(err) - } else if (repo) { - $toggler.show() - - if (remember && shown) { - toggleSidebar(true) - } - - if (isSidebarVisible()) { - const replacer = ['username', 'reponame', 'branch'] - const repoChanged = JSON.stringify(repo, replacer) !== JSON.stringify(currRepo, replacer) - - if (repoChanged || reload === true) { - $document.trigger(EVENT.REQ_START) - currRepo = repo - treeView.show(repo, token) - } else { - treeView.syncSelection() - } - } - } else { - $toggler.hide() - toggleSidebar(false) - } - helpPopup.init() - layoutChanged() - }) - } - - function showView(view) { - $views.removeClass('current') - view.addClass('current') - } - - function showError(err) { - hasError = true - errorView.show(err) - } - - function toggleSidebarAndSave() { - store.set(STORE.SHOWN, !isSidebarVisible(), () => { - toggleSidebar() - if (isSidebarVisible()) { - tryLoadRepo() - } - }) - } - - function toggleSidebar(visibility) { - if (visibility !== undefined) { - if (isSidebarVisible() === visibility) return - toggleSidebar() - } else { - $html.toggleClass(SHOW_CLASS) - $document.trigger(EVENT.TOGGLE, isSidebarVisible()) + else { + treeView.syncSelection() } + } } - - function layoutChanged() { - const width = $sidebar.outerWidth() - adapter.updateLayout(isTogglerVisible(), isSidebarVisible(), width) - store.set(STORE.WIDTH, width) - } - - function isSidebarVisible() { - return $html.hasClass(SHOW_CLASS) - } - - function isTogglerVisible() { - return $toggler.is(':visible') + else { + $toggler.hide() + toggleSidebar(false) } + helpPopup.init() + layoutChanged() + }) } + + function showView(view) { + $views.removeClass('current') + view.addClass('current') + } + + function showError(err) { + hasError = true + errorView.show(err) + } + + function toggleSidebarAndSave() { + store.set(STORE.SHOWN, !isSidebarVisible(), () => { + toggleSidebar() + if (isSidebarVisible()) { + tryLoadRepo() + } + }) + } + + function toggleSidebar(visibility) { + if (visibility !== undefined) { + if (isSidebarVisible() === visibility) return + toggleSidebar() + } + else { + $html.toggleClass(SHOW_CLASS) + $document.trigger(EVENT.TOGGLE, isSidebarVisible()) + } + } + + function layoutChanged(save = false) { + const width = $sidebar.outerWidth() + adapter.updateLayout(isTogglerVisible(), isSidebarVisible(), width) + if (save === true) { + store.set(STORE.WIDTH, width) + } + } + + function isSidebarVisible() { + return $html.hasClass(SHOW_CLASS) + } + + function isTogglerVisible() { + return $toggler.is(':visible') + } + } }) diff --git a/src/styles/base.less b/src/styles/base.less index df9e7a3..6814d26 100755 --- a/src/styles/base.less +++ b/src/styles/base.less @@ -116,6 +116,7 @@ } .jstree-default .jstree-icon, .jstree-default .jstree-icon:empty, .jstree-default .jstree-anchor { line-height: 24px !important; + font-style: normal; } } @@ -169,6 +170,13 @@ height: 60px; } } + + .octotree_opts_disclaimer { + color: gray; + display: block; + font-size: 12px; + margin-left: 17px; + } } } diff --git a/src/template.html b/src/template.html index 3169e5d..83f1e6d 100644 --- a/src/template.html +++ b/src/template.html @@ -69,6 +69,14 @@
+
+ +
+
diff --git a/src/util.storage.js b/src/util.storage.js index 54b653f..a2ee230 100644 --- a/src/util.storage.js +++ b/src/util.storage.js @@ -1,6 +1,13 @@ class Storage { set(key, val, cb) { - localStorage.setItem(key, JSON.stringify(val)) + try { + localStorage.setItem(key, JSON.stringify(val)) + } + catch (e) { + const msg = 'Octotree cannot save its settings. ' + + 'If the local storage for this domain is full, please clean it up and try again.' + console.error(msg, e) + } if (cb) cb() } diff --git a/src/view.options.js b/src/view.options.js index d631183..6f41e34 100644 --- a/src/view.options.js +++ b/src/view.options.js @@ -47,7 +47,7 @@ class OptionsView { * Certainly not a good place to put this logic but Chrome requires * permissions to be requested only in response of user input. So... */ - // @ifdef CHROME + // @ifdef SUPPORT_GHE const $ta = this.$view.find('[data-store$=EURLS]').filter(':visible') if ($ta.length > 0) { const storeKey = $ta.data('store') diff --git a/src/view.tree.js b/src/view.tree.js index 857470a..e6ba1ab 100644 --- a/src/view.tree.js +++ b/src/view.tree.js @@ -21,8 +21,9 @@ class TreeView { const $jstree = this.$jstree $jstree.settings.core.data = (node, cb) => { - const loadAll = this.adapter.canLoadEntireTree() && - this.store.get(STORE.LOADALL) + const prMode = this.store.get(STORE.PR) && repo.pullNumber + const loadAll = this.adapter.canLoadEntireTree() && (prMode || this.store.get(STORE.LOADALL)) + node = !loadAll && (node.id === '#' ? {path: ''} : node.original) this.adapter.loadCodeTree({repo, token, node}, (err, treeData) => { @@ -138,7 +139,9 @@ class TreeView { } else if ($icon.hasClass('blob')) { if (download) { - adapter.downloadFile(href, $target.text()) + const downloadUrl = $target.attr('data-download-url') + const downloadFileName = $target.attr('data-download-filename') + adapter.downloadFile(downloadUrl, downloadFileName) } else { refocusAfterCompletion()