Support old Gitlab

This commit is contained in:
Buu Nguyen 2016-02-18 20:00:06 -08:00
parent 5d5f93e887
commit 6442e10749
8 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,7 @@
### v2.0.8
* Support old GitLab CE deployments
* Fix bug Octotree shows in GitLab raw page
### v2.0.7
* Fix font icons issue on Firefox and Safari
* Fix bug help popup doesn't disappear upon error

BIN
dist/chrome.crx vendored

Binary file not shown.

BIN
dist/chrome.zip vendored

Binary file not shown.

BIN
dist/firefox.xpi vendored

Binary file not shown.

BIN
dist/opera.nex vendored

Binary file not shown.

View File

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

View File

@ -194,7 +194,8 @@ class GitLab extends Adapter {
_get(path, opts, cb) {
const repo = opts.repo
const host = `${location.protocol}//${location.host}/api/v3`
const url = `${host}/projects/${repo.username}%2f${repo.reponame}/repository${path}&private_token=${opts.token}`
const project = $('#project_id').val() || `${repo.username}%2f${repo.reponame}`
const url = `${host}/projects/${project}/repository${path}&private_token=${opts.token}`
const cfg = { url, method: 'GET', cache: false }
$.ajax(cfg)

View File

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