From 21431b4075650323107abddfe97073c959159624 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Sun, 10 Oct 2021 17:51:26 -0500 Subject: [PATCH] Improve problem pdf (LDT) --- templates/problem/problem.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/problem/problem.html b/templates/problem/problem.html index f25fead..1aabfce 100644 --- a/templates/problem/problem.html +++ b/templates/problem/problem.html @@ -81,6 +81,9 @@ $(function() { $('#pdf_button').click(async function(e) { e.preventDefault(); + if (!$('#raw_problem').attr('src')) { + $('#raw_problem').attr('src', '{{problem.code}}/raw') + } while(!$('.math-loaded', frames['raw_problem'].document).length){ await new Promise(r => setTimeout(r, 200)); }