Skip to content

Commit

Permalink
Merge pull request #2 from RTa-scp/main
Browse files Browse the repository at this point in the history
  • Loading branch information
ukwhatn authored Feb 4, 2023
2 parents 6cf30d3 + 13ddff9 commit 494a2cb
Show file tree
Hide file tree
Showing 5 changed files with 2,264 additions and 25 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,3 @@ To build, run `npm run build`. Output can be found in the `dist/` directly,
and all files present should be hosted for usage.

All JavaScript should be written in ES5.

4 changes: 2 additions & 2 deletions css/style-bhl.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

:root {
/* ===TYPEFACES=== */
--body-font: Inter, "M Plus 1p", sans-serif;
--UI-font: PTRootUI, sans-serif;
--body-font: Inter, "M Plus 1p", sans-serif;
--UI-font: PTRootUI, sans-serif;
--title-font: var(--body-font);

/* ===BASE FONT SIZE & LINE HEIGHT=== */
Expand Down
24 changes: 11 additions & 13 deletions html/interwikiFrame.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<!DOCTYPE html>
<html id="interwiki" style="min-width: max-content">
<head>
<meta name="viewport" content="width=device-width,initial-scale=1" />

<head>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<script src="./interwiki.js"></script>
</head>

<script src="./interwiki.js"></script>
</head>

<body>
<div class="side-block">
<div class="heading">
<p></p>
<body>
<div class="side-block">
<div class="heading">
<p></p>
</div>
</div>
</div>
<div id="resizer-container"></div>
</body>

<div id="resizer-container"></div>
</body>
</html>
24 changes: 15 additions & 9 deletions js/createResizeIframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ export var flags = { showInterwiki: false };
export function createResizeIframe(site, frameId) {
var container = document.getElementById("resizer-container");
var resizer = document.createElement("iframe");
var CacheBreak = String(Math.floor(Math.random() * 10000));
var oldheight = 0;
resizer.style.display = "none";
container.appendChild(resizer);

if (frameId[0] !== "/") frameId = "/" + frameId;

Expand All @@ -30,15 +31,20 @@ export function createResizeIframe(site, frameId) {
// why the iframe has it instead
var height = container.getBoundingClientRect().top;
// Brute-force past any subpixel issues
if (height) height += 1;
resizer.src =
site +
"/common--javascript/resize-iframe.html?" +
"#" +
height +
frameId;
if (height !== oldheight) {
container.innerHTML = "";
resizer.src =
site +
"/common--javascript/resize-iframe.html?" +
CacheBreak +
"#" +
height +
frameId;
container.appendChild(resizer);
oldheight = height;
}
}
}, 750);
}, 50);
}

/**
Expand Down
Loading

0 comments on commit 494a2cb

Please sign in to comment.