summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/templates/base.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-01-15 04:23:33 -0800
committerBryan Newbold <bnewbold@archive.org>2021-01-19 19:49:39 -0800
commit6399c95268a833e98179bc1578d0f5454dbe67e2 (patch)
treeed7648efd00ab7fc82f9f46516582333214a8036 /fatcat_scholar/templates/base.html
parentc934f3d426427b3093cae8f8f5e9245a34ff3450 (diff)
downloadfatcat-scholar-6399c95268a833e98179bc1578d0f5454dbe67e2.tar.gz
fatcat-scholar-6399c95268a833e98179bc1578d0f5454dbe67e2.zip
dialog polyfill: need to actually register on every element
Diffstat (limited to 'fatcat_scholar/templates/base.html')
-rw-r--r--fatcat_scholar/templates/base.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html
index 4e09de1..3d19004 100644
--- a/fatcat_scholar/templates/base.html
+++ b/fatcat_scholar/templates/base.html
@@ -405,7 +405,14 @@ if (!(typeof HTMLDialogElement === 'function')) {
link.rel = "stylesheet"
link.type = "text/css"
link.href= "/static/dialog-polyfill.css";
+ js.onload = function() {
+ var dialogs = document.querySelectorAll('dialog');
+ for (i = 0; i < dialogs.length; i++) {
+ dialogPolyfill.registerDialog(dialogs[i]);
+ }
+ };
document.head.appendChild(link);
+
};
</script>
{% if settings.ENABLE_GOATCOUNTER -%}