mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
play sound ,javascript refactor
This commit is contained in:
parent
d5af210785
commit
0a54477435
|
@ -709,10 +709,6 @@ void ArticleRequest::bodyFinished()
|
||||||
head += "<script type=\"text/javascript\">var gdArticleContents; "
|
head += "<script type=\"text/javascript\">var gdArticleContents; "
|
||||||
"if ( !gdArticleContents ) gdArticleContents = \"" + jsVal +" \"; "
|
"if ( !gdArticleContents ) gdArticleContents = \"" + jsVal +" \"; "
|
||||||
"else gdArticleContents += \"" + jsVal + " \";"
|
"else gdArticleContents += \"" + jsVal + " \";"
|
||||||
"function playSound(sound){"
|
|
||||||
" var a=new Audio(sound);"
|
|
||||||
" a.play();"
|
|
||||||
"}"
|
|
||||||
"</script>";
|
"</script>";
|
||||||
|
|
||||||
head += string( "<div class=\"gdarticle" ) +
|
head += string( "<div class=\"gdarticle" ) +
|
||||||
|
|
|
@ -21,3 +21,7 @@ $(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
function playSound(sound) {
|
||||||
|
var a = new Audio(sound);
|
||||||
|
a.play();
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue