Minor refactor

This commit is contained in:
Buu Nguyen 2015-12-28 17:58:49 -08:00
parent 7b61c99084
commit fbc7199d56
5 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "octotree",
"version": "2.0.2",
"version": "2.0.3",
"description": "Code tree for GitHub and GitLab",
"main": "inject.js",
"scripts": {

View File

@ -1,6 +1,6 @@
{
"name": "Octotree",
"version": "2.0.1",
"version": "2.0.3",
"manifest_version": 2,
"author": "Buu Nguyen",
"description": "Code tree for GitHub and GitLab",

View File

@ -9,7 +9,7 @@
"icon": "resource://jid1-Om7eJGwA1U8Akg-at-jetpack/data/icons/icon48.png",
"icon64": "resource://jid1-Om7eJGwA1U8Akg-at-jetpack/data/icons/icon64.png",
"license": "MIT",
"version": "2.0.2",
"version": "2.0.3",
"permissions": {
"cross-domain-content": ["https://api.github.com", "https://github.com", "https://gitlab.com"]
}

View File

@ -13,9 +13,9 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
<string>2.0.0</string>
<string>2.0.3</string>
<key>CFBundleVersion</key>
<string>2.0.0</string>
<string>2.0.3</string>
<key>Chrome</key>
<dict/>
<key>Content</key>

View File

@ -14,7 +14,7 @@ $(document).ready(() => {
const githubUrls = store.get(STORE.GHEURLS).split(/\n/)
.map((url) => url.replace(/(.*?:\/\/[^/]+)(.*)/, '$1'))
.concat('https://github.com')
return ~githubUrls.indexOf(location.protocol + '//' + location.host)
return ~githubUrls.indexOf(`${location.protocol}//${location.host}`)
? new GitHub(store)
: new GitLab(store)
}