diff --git a/HISTORY.md b/HISTORY.md index aff93c0..0752564 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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 diff --git a/dist/chrome.crx b/dist/chrome.crx index 132c8e4..a236d42 100644 Binary files a/dist/chrome.crx and b/dist/chrome.crx differ diff --git a/dist/chrome.zip b/dist/chrome.zip index f6f9cfb..89c306e 100644 Binary files a/dist/chrome.zip and b/dist/chrome.zip differ diff --git a/dist/firefox.xpi b/dist/firefox.xpi index c5495e1..55fc82a 100644 Binary files a/dist/firefox.xpi and b/dist/firefox.xpi differ diff --git a/dist/opera.nex b/dist/opera.nex index 132c8e4..a236d42 100644 Binary files a/dist/opera.nex and b/dist/opera.nex differ diff --git a/package.json b/package.json index 88fe1af..b86840b 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/adapters/gitlab.js b/src/adapters/gitlab.js index cf6964d..9fde919 100644 --- a/src/adapters/gitlab.js +++ b/src/adapters/gitlab.js @@ -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) diff --git a/src/config/chrome/manifest.json b/src/config/chrome/manifest.json index 7d7634c..224b133 100755 --- a/src/config/chrome/manifest.json +++ b/src/config/chrome/manifest.json @@ -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",