Minor refactor
This commit is contained in:
parent
7b61c99084
commit
fbc7199d56
|
@ -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": {
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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"]
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue