@@ -650,6 +650,7 @@ function recclick(type,typeid,info,txt) {
650
650
}
651
651
}
652
652
function setuptracklinks ( i , el ) {
653
+ jQuery ( el ) . addClass ( "trackprepped" ) ;
653
654
if ( jQuery ( el ) . attr ( "data-base" ) ) {
654
655
jQuery ( el ) . click ( function ( e ) {
655
656
var inf = jQuery ( this ) . attr ( 'data-base' ) . split ( '-' ) ;
@@ -756,6 +757,7 @@ function setupvideoembeds(i,el) {
756
757
tabindex : 0 ,
757
758
"class" : "videoembedbtn"
758
759
} ) . insertAfter ( el ) ;
760
+ jQuery ( el ) . addClass ( "prepped" ) ;
759
761
videoembedcounter ++ ;
760
762
}
761
763
@@ -1038,9 +1040,9 @@ function initlinkmarkup(base) {
1038
1040
if ( typeof isImathasAssessment != 'undefined' ) {
1039
1041
$ ( base ) . find ( 'a:not([target])' ) . not ( '.textsegment a, .mce-content-body a' ) . each ( addBlankTarget ) ;
1040
1042
}
1041
- $ ( base ) . find ( 'a' ) . each ( setuptracklinks ) . each ( addNoopener ) ;
1042
- $ ( base ) . find ( 'a[href*="youtu"]' ) . not ( '.textsegment a,.mce-content-body a' ) . each ( setupvideoembeds ) ;
1043
- $ ( base ) . find ( 'a[href*="vimeo"]' ) . not ( '.textsegment a,.mce-content-body a' ) . each ( setupvideoembeds ) ;
1043
+ $ ( base ) . find ( 'a' ) . not ( '.trackprepped' ) . each ( setuptracklinks ) . each ( addNoopener ) ;
1044
+ $ ( base ) . find ( 'a[href*="youtu"]' ) . not ( '.textsegment a,.mce-content-body a,.prepped ' ) . each ( setupvideoembeds ) ;
1045
+ $ ( base ) . find ( 'a[href*="vimeo"]' ) . not ( '.textsegment a,.mce-content-body a,.prepped ' ) . each ( setupvideoembeds ) ;
1044
1046
$ ( base ) . find ( "a.attach" ) . not ( '.textsegment a,.mce-content-body a' ) . not ( ".prepped" ) . each ( setuppreviewembeds ) ;
1045
1047
setupToggler ( base ) ;
1046
1048
setupToggler2 ( base ) ;
0 commit comments