Skip to content

Commit 7f4967c

Browse files
committed
TMS-1204-2: Remove external-link icon for tms.production.geniem.io links
1 parent e4e5823 commit 7f4967c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGELOG.MD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
- TMS-1204-2: Remove external-link icon for tms.production.geniem.io links
11+
1012
## [1.68.0] - 2025-11-05
1113

1214
- TMS-1204: Add expand-icon for image gallery item if it is expandable

assets/scripts/external-links.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default class ExternalLinks {
1919
*/
2020
docReady() {
2121
// Add external icon for links pointing outside of the current domain
22-
const domain = window.location.hostname;
22+
const domains = [ window.location.hostname, 'tms.production.geniem.io' ];
2323
const icon = Common.makeIcon( 'external', 'icon--medium ml-1' );
2424

2525
// Translations are defined in models/strings.php,
@@ -30,10 +30,10 @@ export default class ExternalLinks {
3030
};
3131

3232
// Links in regular context
33-
$( '#main-content a[href*="//"]:not(.figure__link, .button, .logo-wall__link, .link-list a, [href*="' + domain + '"])' ).append( icon ); // eslint-disable-line
33+
$( '#main-content a[href*="//"]:not(.figure__link, .button, .logo-wall__link, .link-list a, [href*="' + domains[0] + '"], [href*="' + domains[1] + '"])' ).append( icon ); // eslint-disable-line
3434

3535
// Links with icons (replace current icon with "opens in new window" -icon)
36-
$( '#main-content a[href*="//"]:has(.icon):not(.link-list a, [href*="' + domain + '"])' ).each( function() {
36+
$( '#main-content a[href*="//"]:has(.icon):not(.link-list a, [href*="' + domains[0] + '"], [href*="' + domains[1] + '"])' ).each( function() { // eslint-disable-line
3737
const iconOld = $( this ).find( '.icon' );
3838
const iconNew = $.parseHTML( icon );
3939

@@ -54,7 +54,7 @@ export default class ExternalLinks {
5454
} );
5555

5656
// Add screen reader text that informs if the link is an external website
57-
$( '#main-content a[href*="//"]:not([href*="' + domain + '"])' ).append( `<span class="is-sr-only external-info">(${ translations.external_link })</span>` ); // eslint-disable-line
57+
$( '#main-content a[href*="//"]:not([href*="' + domains[0] + '"], [href*="' + domains[1] + '"])' ).append( `<span class="is-sr-only external-info">(${ translations.external_link })</span>` ); // eslint-disable-line
5858

5959
// Add instructional text for screen readers on links which open a new window/tab
6060
if ( $( 'a[target="_blank"]' ).children( '.external-info' ).length > 0 ) {

0 commit comments

Comments
 (0)