Skip to content

Commit b058b70

Browse files
authored
Switch to working MutationObserver for responding to page updates (#242)
* Switch to working MutationObserver for responding to page updates * Bump version and populate update notification * Fix up linting error --------- Co-authored-by: Kyle Roeschley <kyle.roeschley@emerson.com>
1 parent 51c8dbf commit b058b70

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/azdo-pr-dashboard.user.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22

33
// @name More Awesome Azure DevOps (userscript)
4-
// @version 3.8.0
4+
// @version 3.8.1
55
// @author Alejandro Barreto (NI)
66
// @description Makes general improvements to the Azure DevOps experience, particularly around pull requests. Also contains workflow improvements for NI engineers.
77
// @license MIT
@@ -76,14 +76,12 @@
7676
'agent-arbitration-status-off': 'Off',
7777
});
7878

79-
eus.showTipOnce('release-2024-06-06', 'New in the AzDO userscript', `
80-
<p>Highlights from the 2024-06-06 update!</p>
81-
<p>Changes to the build logs view:</p>
79+
eus.showTipOnce('release-2025-08-08', 'New in the AzDO userscript', `
80+
<p>Highlights from the 2025-08-08 update!</p>
8281
<ul>
83-
<li>The left-side jobs pane is now resizable.</li>
82+
<li>New: display the followers of a work item in the newer Boards view (#240).</li>
83+
<li>Fix: navigating to the pull requests view from another AzDO page will now correctly show the organization pull requests page link. (#242)</li>
8484
</ul>
85-
<p>See also <a href="https://github.com/alejandro5042/azdo-userscripts/commits/master/?since=2021-11-15&until=2024-04-16" target="_blank">other changes since our last update notification</a>.</p>
86-
<hr>
8785
<p>Comments, bugs, suggestions? File an issue on <a href="https://github.com/alejandro5042/azdo-userscripts" target="_blank">GitHub</a> 🧡</p>
8886
`);
8987
}
@@ -155,7 +153,9 @@
155153
onPageUpdatedThrottled.flush();
156154

157155
// Call our event handler if we notice new elements being inserted into the DOM. This happens as the page is loading or updating dynamically based on user activity.
158-
$('body > div.full-size')[0].addEventListener('DOMNodeInserted', onPageUpdatedThrottled);
156+
const targetNode = $('body > div.full-size')[0];
157+
const observer = new MutationObserver(onPageUpdatedThrottled);
158+
observer.observe(targetNode, { childList: true, subtree: true });
159159
}
160160

161161
function watchForStatusCardAndMoveToRightSideBar(session) {

0 commit comments

Comments
 (0)