mirror of
https://github.com/cyclotruc/gitingest.git
synced 2026-04-28 13:59:30 +00:00
❄️Winter theme (temporary)
This commit is contained in:
parent
0e988fb201
commit
36199debad
3 changed files with 115 additions and 1 deletions
|
|
@ -83,7 +83,17 @@ function handleSubmit(event, showLoading = false) {
|
|||
// Store the star count before updating the DOM
|
||||
const starCount = currentStars;
|
||||
|
||||
document.documentElement.innerHTML = html;
|
||||
|
||||
// TEMPORARY SNOW LOGIC //
|
||||
const parser = new DOMParser();
|
||||
const newDoc = parser.parseFromString(html, 'text/html');
|
||||
|
||||
const existingCanvas = document.getElementById('snow-canvas');
|
||||
document.body.innerHTML = newDoc.body.innerHTML;
|
||||
if (existingCanvas) {
|
||||
document.body.insertBefore(existingCanvas, document.body.firstChild);
|
||||
}
|
||||
// END TEMPORARY SNOW LOGIC //
|
||||
|
||||
// Wait for next tick to ensure DOM is updated
|
||||
setTimeout(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue