@@ -257,22 +257,6 @@ void ExportUtil::exportHtml(QWidget *widget, Contest *contest, const QString &fi
257257 }
258258 out << " </style>" ;
259259
260- /* 下载jquery有几个时间段
261- * 1是编译前
262- * 2是编译期
263- * 3是运行LemonLime时
264- * 4是打开result.html时
265- * 这里选了第1种
266- */
267-
268- // out << R"(<script src="https://unpkg.com/jquery@3/dist/jquery.slim.min.js"></script>)";
269-
270- QFile jqFile (" :/js/jquery.slim.min.js" );
271- jqFile.open (QFile::ReadOnly);
272- QString jq (jqFile.readAll ());
273-
274- out << " <script>" << jq << " </script>" ;
275-
276260 out << " <title>" << contest->getContestTitle () << " : " << tr (" Contest Result" ) << " </title>" ;
277261 out << " </head><body>" ;
278262 QList<std::pair<int , QString>> sortList;
@@ -413,11 +397,11 @@ void ExportUtil::exportHtml(QWidget *widget, Contest *contest, const QString &fi
413397
414398 out << R"(
415399 <script>
416- $ ("div[id^='c'] th").addClass( "td-0");
417- $ ("div[id^='c'] td").addClass( "td-0");
418- $ ("div[id^='c']>p>span").css("font-weight", " bold").css("font-size", " large");
419- $ ("div[id^='c']>p>table").css(" border", "solid");
420- $ ("div[id^='c']>p>table th").attr( "scope", "col");
400+ document.querySelectorAll ("div[id^='c'] th").forEach(e=>e.classList.add( "td-0") );
401+ document.querySelectorAll ("div[id^='c'] td").forEach(e=>e.classList.add( "td-0") );
402+ document.querySelectorAll ("div[id^='c']>p>span").forEach(e=>{e.style.fontWeight=" bold";e.style.fontSize=" large";} );
403+ document.querySelectorAll ("div[id^='c']>p>table").forEach(e=>e.style. border= "solid");
404+ document.querySelectorAll ("div[id^='c']>p>table th").forEach(e=>e.setAttribute( "scope","col") );
421405 </script>
422406 )" ;
423407 out << " </body>" ;
0 commit comments