From 612dc8db0fff6871d95c2ff113dd344667c5dd20 Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Wed, 4 Dec 2024 12:04:21 +0800 Subject: [PATCH] Revert "opt: [mdx]js script with defer attribute (#1869)" This reverts commit 939e78633165c1cb1908ece5448139d8bea49b41. --- src/dict/mdx.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/dict/mdx.cc b/src/dict/mdx.cc index 49a15bb1..35c769f3 100644 --- a/src/dict/mdx.cc +++ b/src/dict/mdx.cc @@ -959,7 +959,7 @@ void MdxDictionary::replaceLinks( QString & id, QString & article ) continue; } else { - //audio ,script,video ,html5 tags fall here. + //audio ,video ,html5 tags fall here. match = RX::Mdx::srcRe.match( linkTxt ); if ( match.hasMatch() ) { QString newText; @@ -971,15 +971,9 @@ void MdxDictionary::replaceLinks( QString & id, QString & article ) else { scheme = "bres://"; } - newText = match.captured( 1 ) + match.captured( 2 ) + scheme + id + "/" + match.captured( 3 ) + match.captured( 2 ); - //add defer to script tag - if ( linkType.compare( "script" ) == 0 ) { - newText = newText + " defer "; - } - newLink = linkTxt.replace( match.capturedStart(), match.capturedLength(), newText ); } else {