Skip to content

Commit

Permalink
Use interwiki's resize script
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjrw committed May 23, 2024
1 parent be7d04a commit de4e148
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 74 deletions.
72 changes: 0 additions & 72 deletions stats-frontend/assets/createResizeIframe.js

This file was deleted.

8 changes: 6 additions & 2 deletions stats-frontend/graphs.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script src="https://cdn.jsdelivr.net/npm/luxon@^3"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-luxon@^1"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-annotation@^3"></script>
<script src="assets/createResizeIframe.js"></script>
<script src="https://interwiki.scpwiki.com/resizeIframe.js"></script>

<script>
const palette = {
Expand All @@ -31,7 +31,11 @@
}

addEventListener("DOMContentLoaded", async () => {
autoResizeIframe("http://notifications.wikidot.com")
const resize = window.resizeIframe.createResizeIframe(
"http://notifications.wikidot.com",
location.href.replace(/^.*\//, "/")
)
new ResizeObserver(() => resize()).observe(document.documentElement)

const abortController = new AbortController()
const abortTimer = setTimeout(() => abortController.abort(), 10000)
Expand Down

0 comments on commit de4e148

Please sign in to comment.