Compare commits

..

2 commits

3 changed files with 121 additions and 90 deletions

View file

@ -1,3 +1,4 @@
/*
@font-face { @font-face {
font-family: 'Iosevka Aile Web'; font-family: 'Iosevka Aile Web';
@ -68,77 +69,93 @@
font-style: italic; font-style: italic;
src: url('woff2/iosevka-aile-extralightitalic.woff2') format('woff2'), url('woff/iosevka-aile-extralightitalic.woff') format('woff'), url('ttf/iosevka-aile-extralightitalic.ttf') format('truetype'); src: url('woff2/iosevka-aile-extralightitalic.woff2') format('woff2'), url('woff/iosevka-aile-extralightitalic.woff') format('woff'), url('ttf/iosevka-aile-extralightitalic.ttf') format('truetype');
} }
*/
@font-face { @font-face {
font-family: 'Iosevka Aile Web'; font-family: "Iosevka Aile Web";
font-display: swap; font-display: swap;
font-weight: 300; font-weight: 300;
font-stretch: normal; font-stretch: normal;
font-style: normal; font-style: normal;
src: url('woff2/iosevka-aile-light.woff2') format('woff2'), url('woff/iosevka-aile-light.woff') format('woff'), url('ttf/iosevka-aile-light.ttf') format('truetype'); src: url("woff2/iosevka-aile-light.woff2") format("woff2"),
url("woff/iosevka-aile-light.woff") format("woff"),
url("ttf/iosevka-aile-light.ttf") format("truetype");
} }
@font-face { @font-face {
font-family: 'Iosevka Aile Web'; font-family: "Iosevka Aile Web";
font-display: swap; font-display: swap;
font-weight: 300; font-weight: 300;
font-stretch: normal; font-stretch: normal;
font-style: oblique; font-style: oblique;
src: url('woff2/iosevka-aile-lightoblique.woff2') format('woff2'), url('woff/iosevka-aile-lightoblique.woff') format('woff'), url('ttf/iosevka-aile-lightoblique.ttf') format('truetype'); src: url("woff2/iosevka-aile-lightoblique.woff2") format("woff2"),
url("woff/iosevka-aile-lightoblique.woff") format("woff"),
url("ttf/iosevka-aile-lightoblique.ttf") format("truetype");
} }
@font-face { @font-face {
font-family: 'Iosevka Aile Web Oblique'; font-family: "Iosevka Aile Web Oblique";
font-display: swap; font-display: swap;
font-weight: 300; font-weight: 300;
font-stretch: normal; font-stretch: normal;
src: url('woff2/iosevka-aile-lightoblique.woff2') format('woff2'), url('woff/iosevka-aile-lightoblique.woff') format('woff'), url('ttf/iosevka-aile-lightoblique.ttf') format('truetype'); src: url("woff2/iosevka-aile-lightoblique.woff2") format("woff2"),
url("woff/iosevka-aile-lightoblique.woff") format("woff"),
url("ttf/iosevka-aile-lightoblique.ttf") format("truetype");
} }
@font-face { @font-face {
font-family: 'Iosevka Aile Web'; font-family: "Iosevka Aile Web";
font-display: swap; font-display: swap;
font-weight: 300; font-weight: 300;
font-stretch: normal; font-stretch: normal;
font-style: italic; font-style: italic;
src: url('woff2/iosevka-aile-lightitalic.woff2') format('woff2'), url('woff/iosevka-aile-lightitalic.woff') format('woff'), url('ttf/iosevka-aile-lightitalic.ttf') format('truetype'); src: url("woff2/iosevka-aile-lightitalic.woff2") format("woff2"),
url("woff/iosevka-aile-lightitalic.woff") format("woff"),
url("ttf/iosevka-aile-lightitalic.ttf") format("truetype");
} }
@font-face { @font-face {
font-family: 'Iosevka Aile Web'; font-family: "Iosevka Aile Web";
font-display: swap; font-display: swap;
font-weight: 400; font-weight: 400;
font-stretch: normal; font-stretch: normal;
font-style: normal; font-style: normal;
src: url('woff2/iosevka-aile-regular.woff2') format('woff2'), url('woff/iosevka-aile-regular.woff') format('woff'), url('ttf/iosevka-aile-regular.ttf') format('truetype'); src: url("woff2/iosevka-aile-regular.woff2") format("woff2"),
url("woff/iosevka-aile-regular.woff") format("woff"),
url("ttf/iosevka-aile-regular.ttf") format("truetype");
} }
@font-face { @font-face {
font-family: 'Iosevka Aile Web'; font-family: "Iosevka Aile Web";
font-display: swap; font-display: swap;
font-weight: 400; font-weight: 400;
font-stretch: normal; font-stretch: normal;
font-style: oblique; font-style: oblique;
src: url('woff2/iosevka-aile-oblique.woff2') format('woff2'), url('woff/iosevka-aile-oblique.woff') format('woff'), url('ttf/iosevka-aile-oblique.ttf') format('truetype'); src: url("woff2/iosevka-aile-oblique.woff2") format("woff2"),
url("woff/iosevka-aile-oblique.woff") format("woff"),
url("ttf/iosevka-aile-oblique.ttf") format("truetype");
} }
@font-face { @font-face {
font-family: 'Iosevka Aile Web Oblique'; font-family: "Iosevka Aile Web Oblique";
font-display: swap; font-display: swap;
font-weight: 400; font-weight: 400;
font-stretch: normal; font-stretch: normal;
src: url('woff2/iosevka-aile-oblique.woff2') format('woff2'), url('woff/iosevka-aile-oblique.woff') format('woff'), url('ttf/iosevka-aile-oblique.ttf') format('truetype'); src: url("woff2/iosevka-aile-oblique.woff2") format("woff2"),
url("woff/iosevka-aile-oblique.woff") format("woff"),
url("ttf/iosevka-aile-oblique.ttf") format("truetype");
} }
@font-face { @font-face {
font-family: 'Iosevka Aile Web'; font-family: "Iosevka Aile Web";
font-display: swap; font-display: swap;
font-weight: 400; font-weight: 400;
font-stretch: normal; font-stretch: normal;
font-style: italic; font-style: italic;
src: url('woff2/iosevka-aile-italic.woff2') format('woff2'), url('woff/iosevka-aile-italic.woff') format('woff'), url('ttf/iosevka-aile-italic.ttf') format('truetype'); src: url("woff2/iosevka-aile-italic.woff2") format("woff2"),
url("woff/iosevka-aile-italic.woff") format("woff"),
url("ttf/iosevka-aile-italic.ttf") format("truetype");
} }
/*
@font-face { @font-face {
font-family: 'Iosevka Aile Web'; font-family: 'Iosevka Aile Web';
font-display: swap; font-display: swap;
@ -208,42 +225,50 @@
font-style: italic; font-style: italic;
src: url('woff2/iosevka-aile-semibolditalic.woff2') format('woff2'), url('woff/iosevka-aile-semibolditalic.woff') format('woff'), url('ttf/iosevka-aile-semibolditalic.ttf') format('truetype'); src: url('woff2/iosevka-aile-semibolditalic.woff2') format('woff2'), url('woff/iosevka-aile-semibolditalic.woff') format('woff'), url('ttf/iosevka-aile-semibolditalic.ttf') format('truetype');
} }
*/
@font-face { @font-face {
font-family: 'Iosevka Aile Web'; font-family: "Iosevka Aile Web";
font-display: swap; font-display: swap;
font-weight: 700; font-weight: 700;
font-stretch: normal; font-stretch: normal;
font-style: normal; font-style: normal;
src: url('woff2/iosevka-aile-bold.woff2') format('woff2'), url('woff/iosevka-aile-bold.woff') format('woff'), url('ttf/iosevka-aile-bold.ttf') format('truetype'); src: url("woff2/iosevka-aile-bold.woff2") format("woff2"),
url("woff/iosevka-aile-bold.woff") format("woff"),
url("ttf/iosevka-aile-bold.ttf") format("truetype");
} }
@font-face { @font-face {
font-family: 'Iosevka Aile Web'; font-family: "Iosevka Aile Web";
font-display: swap; font-display: swap;
font-weight: 700; font-weight: 700;
font-stretch: normal; font-stretch: normal;
font-style: oblique; font-style: oblique;
src: url('woff2/iosevka-aile-boldoblique.woff2') format('woff2'), url('woff/iosevka-aile-boldoblique.woff') format('woff'), url('ttf/iosevka-aile-boldoblique.ttf') format('truetype'); src: url("woff2/iosevka-aile-boldoblique.woff2") format("woff2"),
url("woff/iosevka-aile-boldoblique.woff") format("woff"),
url("ttf/iosevka-aile-boldoblique.ttf") format("truetype");
} }
@font-face { @font-face {
font-family: 'Iosevka Aile Web Oblique'; font-family: "Iosevka Aile Web Oblique";
font-display: swap; font-display: swap;
font-weight: 700; font-weight: 700;
font-stretch: normal; font-stretch: normal;
src: url('woff2/iosevka-aile-boldoblique.woff2') format('woff2'), url('woff/iosevka-aile-boldoblique.woff') format('woff'), url('ttf/iosevka-aile-boldoblique.ttf') format('truetype'); src: url("woff2/iosevka-aile-boldoblique.woff2") format("woff2"),
url("woff/iosevka-aile-boldoblique.woff") format("woff"),
url("ttf/iosevka-aile-boldoblique.ttf") format("truetype");
} }
@font-face { @font-face {
font-family: 'Iosevka Aile Web'; font-family: "Iosevka Aile Web";
font-display: swap; font-display: swap;
font-weight: 700; font-weight: 700;
font-stretch: normal; font-stretch: normal;
font-style: italic; font-style: italic;
src: url('woff2/iosevka-aile-bolditalic.woff2') format('woff2'), url('woff/iosevka-aile-bolditalic.woff') format('woff'), url('ttf/iosevka-aile-bolditalic.ttf') format('truetype'); src: url("woff2/iosevka-aile-bolditalic.woff2") format("woff2"),
url("woff/iosevka-aile-bolditalic.woff") format("woff"),
url("ttf/iosevka-aile-bolditalic.ttf") format("truetype");
} }
/*
@font-face { @font-face {
font-family: 'Iosevka Aile Web'; font-family: 'Iosevka Aile Web';
font-display: swap; font-display: swap;
@ -313,3 +338,5 @@
font-style: italic; font-style: italic;
src: url('woff2/iosevka-aile-heavyitalic.woff2') format('woff2'), url('woff/iosevka-aile-heavyitalic.woff') format('woff'), url('ttf/iosevka-aile-heavyitalic.ttf') format('truetype'); src: url('woff2/iosevka-aile-heavyitalic.woff2') format('woff2'), url('woff/iosevka-aile-heavyitalic.woff') format('woff'), url('ttf/iosevka-aile-heavyitalic.ttf') format('truetype');
} }
*/

View file

@ -18,15 +18,21 @@ function initWaiting(elem: HTMLElement) {
} }
async function loadPage(page: string, elem: HTMLElement) { async function loadPage(page: string, elem: HTMLElement) {
// Fetch page content
console.log(page + ": fetching"); console.log(page + ": fetching");
let html = await getPageHTML(page); let html = await getPageHTML(page);
// Convert relative links to absolute // Convert relative links to absolute
html = html.replace(/"\/wiki/gi, '"//tgstation13.org/wiki'); html = html.replace(/"\/wiki/gi, '"//tgstation13.org/wiki');
elem.innerHTML = html;
console.log(page + ": processing"); // Set as HTML content and run HTML manipulations on it
userscript(elem, page); requestAnimationFrame(() => {
console.log(page + ": userscript applied"); elem.innerHTML = html;
elem.classList.remove("waiting"); console.log(page + ": processing");
userscript(elem, page);
console.log(page + ": userscript applied");
elem.classList.remove("waiting");
});
} }
type TabElements = { tabListItem: HTMLElement; tabContentItem: HTMLElement }; type TabElements = { tabListItem: HTMLElement; tabContentItem: HTMLElement };

View file

@ -503,16 +503,14 @@ export default function (root: HTMLElement, docname: string) {
); );
} }
window.requestAnimationFrame(() => { switch (docname) {
switch (docname) { case "Guide_to_chemistry":
case "Guide_to_chemistry": betterChemistry();
betterChemistry(); break;
break; default:
default: betterGeneric();
betterGeneric(); break;
break; }
} // Everything is loaded, remove loading bar
// Everything is loaded, remove loading bar statusMessage.innerHTML = "";
statusMessage.innerHTML = "";
});
} }