Skip to content

Commit 4e74e5d

Browse files
authored
Merge pull request #524 from red-gate/sql-monitor-old-version-notice
Outdated version notice condition updates
2 parents bf22d42 + 43676e0 commit 4e74e5d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/confluence/js/honeycomb.confluence.latestVersionNotification.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ const displayNotification = ( latestSpace, docLink ) => {
5252
};
5353

5454
const init = () => {
55-
56-
// Only check for latest version if there's a version number in the URL.
55+
const manualUrlsToCheck = ['https://documentation.red-gate.com/sm'];
5756
const urlParts = window.location.pathname.split('/');
58-
const spaceUri = (urlParts[0] !== '') ? urlParts[0] : urlParts[1];
59-
if (spaceUri.match(/[0-9]/ig) !== null) {
57+
const spaceUri = urlParts[0] !== '' ? urlParts[0] : urlParts[1];
58+
59+
if (manualUrlsToCheck.includes(window.location.href) || spaceUri.match(/[0-9]/ig) !== null) {
6060
const link = document.querySelector('.js-older-versions a');
6161
if (link) {
62-
checkForLatestVersion(link.href);
62+
checkForLatestVersion(link.href);
6363
}
6464
}
6565
};

0 commit comments

Comments
 (0)