diff --git a/HISTORY.md b/HISTORY.md index 6d62821..bcd7d31 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +### v2.0.13 +* Avoid showing on patch and diff +* Add more reserved names +* Update GitLab token link + ### v2.0.12 * Fix issue due to GitLab redesign diff --git a/README.md b/README.md index e5ad9fa..1b93467 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ __Note__: Firefox 43+ requires add-ons to be signed. Therefore, you should insta ## Settings ### Access Token -__Note for the paranoids (like me!)__: Octotree stores access tokens in your browser local storage and never transmits it anywhere. If you want to verify, check out the source, starting with [this line](https://github.com/buunguyen/octotree/blob/master/src/view.options.js#L77). +__Note for the paranoids (like me!)__: Octotree stores access tokens in your browser local storage and never transmits it anywhere. If you want to verify, check out the source, starting with [this line](https://github.com/buunguyen/octotree/blob/master/src/view.options.js#L77). #### GitHub Octotree uses [GitHub API](https://developer.github.com/v3/) to retrieve repository metadata. By default, it makes unauthenticated requests to the GitHub API. However, there are two situations when requests must be authenticated: @@ -43,7 +43,7 @@ Octotree uses [GitHub API](https://developer.github.com/v3/) to retrieve reposit When that happens, Octotree will ask for your [GitHub personal access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use). If you don't already have one, [create one](https://github.com/settings/tokens/new), then copy and paste it into the textbox. Note that the minimal scopes that should be granted are `public_repo` and `repo` (if you need access to private repositories). #### GitLab -Octotree uses [GitLab API](http://doc.gitlab.com/ce/api/) to retrieve repository metadata. By default, Octotree attempts to retrieve the access token embedded in the GitLab DOM and use the token to authenticate against the GitLab API. If Octotree cannot retrieve the token, it will prompt you to [create one](https://gitlab.com/profile/account). +Octotree uses [GitLab API](http://doc.gitlab.com/ce/api/) to retrieve repository metadata. By default, Octotree attempts to retrieve the access token embedded in the GitLab DOM and use the token to authenticate against the GitLab API. If Octotree cannot retrieve the token, it will prompt you to [create one](https://gitlab.com/profile/personal_access_tokens). ### Enterprise URLs By default, Octotree only works on `github.com` and `gitlab.com`. To support enterprise version (Chrome and Opera only), you must grant Octotree sufficient permissions. Follow these steps to do so: diff --git a/package.json b/package.json index db90248..ffb57a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "octotree", - "version": "2.0.12", + "version": "2.0.13", "description": "Code tree for GitHub and GitLab", "main": "inject.js", "scripts": { diff --git a/src/adapters/github.js b/src/adapters/github.js index 28e436b..8d59548 100644 --- a/src/adapters/github.js +++ b/src/adapters/github.js @@ -125,9 +125,9 @@ class GitHub extends Adapter { return cb() } - // (username)/(reponame)[/(type)] - const match = window.location.pathname.match(/([^\/]+)\/([^\/]+)(?:\/([^\/]+))?/) - if (!match) { + // (username)/(reponame)[/(type)][.*][.(patch|diff)] + const match = window.location.pathname.match(/([^\/]+)\/([^\/]+)(?:\/([^\/]+))?(?:\/[^.]+)?(?:\.(patch|diff))?$/i) + if (!match || match[4]) { return cb() } diff --git a/src/config/chrome/manifest.json b/src/config/chrome/manifest.json index dc29760..857d7e0 100755 --- a/src/config/chrome/manifest.json +++ b/src/config/chrome/manifest.json @@ -1,6 +1,6 @@ { "name": "Octotree", - "version": "2.0.12", + "version": "2.0.13", "manifest_version": 2, "author": "Buu Nguyen", "description": "Code tree for GitHub and GitLab", diff --git a/src/config/firefox/package.json b/src/config/firefox/package.json index 7a0dcf1..a4d951e 100644 --- a/src/config/firefox/package.json +++ b/src/config/firefox/package.json @@ -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.12", + "version": "2.0.13", "permissions": { "cross-domain-content": ["https://api.github.com", "https://github.com", "https://gitlab.com"], "private-browsing": true diff --git a/src/config/safari/Info.plist b/src/config/safari/Info.plist index 4b96b18..cf2b12c 100755 --- a/src/config/safari/Info.plist +++ b/src/config/safari/Info.plist @@ -13,9 +13,9 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleShortVersionString - 2.0.12 + 2.0.13 CFBundleVersion - 2.0.12 + 2.0.13 Chrome Content