diff --git a/main/inc/lib/javascript/fixlinks.js b/main/inc/lib/javascript/fixlinks.js index 1a5145b182..b11d3288c3 100644 --- a/main/inc/lib/javascript/fixlinks.js +++ b/main/inc/lib/javascript/fixlinks.js @@ -48,8 +48,18 @@ $(document).ready(function() { var width = embed.attr('width'); var src = embed.attr('src'); - var n = src.indexOf("youtube.com"); - if (n > 0) { + var urlToAvoid = src.indexOf("youtube.com"); + if (urlToAvoid >= 0) { + return true; + } + + urlToAvoid = src.indexOf("/main/inc/lib/fckeditor/editor/fckeditor.html"); + if (urlToAvoid >= 0) { + return true; + } + + urlToAvoid = src.indexOf("javascript:void(0)"); + if (urlToAvoid >= 0) { return true; } @@ -96,6 +106,12 @@ $(document).ready(function() { if (hasJs >= 0) { return true; } + + hasJs = $(this).attr('href').indexOf('#collapse'); + if (hasJs >= 0) { + return true; + } + } if ($(this).attr('class')) { diff --git a/main/newscorm/scorm_api.php b/main/newscorm/scorm_api.php index 2a78c9c7b7..35fbf309b3 100755 --- a/main/newscorm/scorm_api.php +++ b/main/newscorm/scorm_api.php @@ -2196,11 +2196,22 @@ function attach_glossary_into_scorm(type) { '&width='+width; var result = $("iframe").contents().find('#'+openerId); - var n = src.indexOf("youtube.com"); - if (n > 0) { + var urlToAvoid = src.indexOf("youtube.com"); + if (urlToAvoid >= 0) { return true; } + urlToAvoid = src.indexOf("/main/inc/lib/fckeditor/editor/fckeditor.html"); + if (urlToAvoid >= 0) { + return true; + } + + urlToAvoid = src.indexOf("javascript:void(0)"); + if (urlToAvoid >= 0) { + return true; + } + + if (result.length == 0) { if (embed.prev().attr('class') != 'generated') { $(this).parent().prepend(link + '
'); @@ -2235,6 +2246,10 @@ function attach_glossary_into_scorm(type) { if (hasJs >= 0) { return true; } + var hasJs = $(this).attr('href').indexOf('#collapse'); + if (hasJs >= 0) { + return true; + } } if ($(this).attr('class')) {