mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-18 11:34:05 +00:00
Revert "opt: [mdx]js script with defer attribute (#1869)"
This reverts commit 939e786331
.
This commit is contained in:
parent
5982b1d337
commit
612dc8db0f
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue