Skip to content

Commit

Permalink
Fix another instance of removing /DefaultCollection/ in VSCode.dev links
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro5042 committed Nov 16, 2021
1 parent 23f81ff commit fd3b611
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/azdo-pr-dashboard.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==

// @name More Awesome Azure DevOps (userscript)
// @version 3.2.1
// @version 3.2.2
// @author Alejandro Barreto (NI)
// @description Makes general improvements to the Azure DevOps experience, particularly around pull requests. Also contains workflow improvements for NI engineers.
// @license MIT
Expand Down Expand Up @@ -164,8 +164,7 @@

const branchUrl = `${window.location.origin}${$('.pr-header-branches a').attr('href')}`;

let url = `${branchUrl}&path=${path}`;
url = url.replace('/DefaultCollection/', '/'); // For some reason, we need to remove this.
const url = `${branchUrl}&path=${path}`;
return url;
}));
});
Expand Down Expand Up @@ -372,7 +371,10 @@

function setupVSCodeButton(getUrl = () => window.location.href) {
function navigateToVSCode() {
window.location = getUrl().replace(/^https?:\/\//i, 'https://vscode.dev/');
let url = getUrl();
url = url.replace('/DefaultCollection/', '/'); // For some reason, we need to remove this.
url = url.replace(/^https?:\/\//i, 'https://vscode.dev/');
window.location = url;
}

const vscodeButton = $('<button />')
Expand Down

0 comments on commit fd3b611

Please sign in to comment.