Skip to content

Commit 48d74d8

Browse files
committed
Display the overview icon on the project root page
1 parent 5a2132e commit 48d74d8

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fxazdobuttons",
33
"type": "module",
4-
"version": "1.0.17",
4+
"version": "1.0.18",
55
"description": "",
66
"author": "Will Westrop",
77
"license": "MIT",

template/chrome/content-script.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ function getIcon() {
2929

3030
const url = window.location.href;
3131

32-
if (url.includes("/_dashboards")
32+
const isRoot = /https:\/\/(?<org>[^\.]+).visualstudio.com\/(?<proj>[^\/]+)\/?$/.test(url)
33+
|| /https:\/\/dev.azure.com\/(?<org>[^\/]+)\/(?<project>[^\/]+)\/?$/.test(url);
34+
35+
if (isRoot
36+
|| url.includes("/_dashboards")
3337
|| url.includes("/_analytics")
3438
|| url.includes("/_wiki")) {
3539
return "https://cdn.vsassets.io/ext/ms.vss-tfs-web/platform-content/Nav-Dashboard.S24hPDN9_BLImMxi.png";

template/firefox/content-script.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)