Skip to content

Commit

Permalink
Merge pull request #11 from LuisReinoso/fix/update-gitlab-support
Browse files Browse the repository at this point in the history
fix: update regex to match with new gitlab url.
  • Loading branch information
LuisReinoso authored May 6, 2020
2 parents 9163f9d + a5b41db commit 170eafa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extension/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function isButtonInsertedBitbucket(url) {

function isButtonInsertedGitlab(url) {
if (
/https:\/\/gitlab\.com\/[a-zA-Z0-9-_\.]*\/[a-zA-Z0-9-_\.]*\/blob\/.*/.test(
/https:\/\/gitlab\.com\/[a-zA-Z0-9-_\.]*\/[a-zA-Z0-9-_\.]*\/-\/blob\/.*/.test(
url
)
) {
Expand All @@ -98,7 +98,7 @@ function isButtonInsertedGitlab(url) {
const buttonGitHistory = document.createElement('a');
buttonGitHistory.innerHTML = 'Open in Git History';
buttonGitHistory.setAttribute('class', 'btn btn-default btn-sm');
buttonGitHistory.setAttribute('href', url);
buttonGitHistory.setAttribute('href', url.replace('/-/','/'));
try {
document
.getElementsByClassName('file-actions')[0]
Expand Down

0 comments on commit 170eafa

Please sign in to comment.