@@ -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