MediaWiki
Group-Grouse.js: Difference between revisions
From Grouse House Wiki
No edit summary |
No edit summary |
||
Line 193: | Line 193: | ||
modalpreview.src = motherlyurl; | modalpreview.src = motherlyurl; | ||
if (darkbasetoggle.checked) { | if (darkbasetoggle.checked) { | ||
basewolf.src = "/images/ | basewolf.src = "/images/e/e9/Basewolfdark_motherly.png"; | ||
} else { | } else { | ||
basewolf.src = "/images/d/d7/Basewolf_motherly.png"; | basewolf.src = "/images/d/d7/Basewolf_motherly.png"; | ||
Line 200: | Line 200: | ||
modalpreview.src = relaxedurl; | modalpreview.src = relaxedurl; | ||
if (darkbasetoggle.checked) { | if (darkbasetoggle.checked) { | ||
basewolf.src = "/images/ | basewolf.src = "/images/d/de/Basewolfdark_relaxed.png"; | ||
} else { | } else { | ||
basewolf.src = "/images/6/67/Basewolf_relaxed.png"; | basewolf.src = "/images/6/67/Basewolf_relaxed.png"; | ||
Line 207: | Line 207: | ||
modalpreview.src = sentinelurl; | modalpreview.src = sentinelurl; | ||
if (darkbasetoggle.checked) { | if (darkbasetoggle.checked) { | ||
basewolf.src = "/images/ | basewolf.src = "/images/c/c7/Basewolfdark_sentinel.png"; | ||
} else { | } else { | ||
basewolf.src = "/images/e/e0/Basewolf_sentinel.png"; | basewolf.src = "/images/e/e0/Basewolf_sentinel.png"; | ||
Line 214: | Line 214: | ||
modalpreview.src = adolurl; | modalpreview.src = adolurl; | ||
if (darkbasetoggle.checked) { | if (darkbasetoggle.checked) { | ||
basewolf.src = "/images/ | basewolf.src = "/images/4/48/Basewolfdark_adolescent.png"; | ||
} else { | } else { | ||
basewolf.src = "/images/7/78/Basewolf_adolescent.png"; | basewolf.src = "/images/7/78/Basewolf_adolescent.png"; | ||
Line 221: | Line 221: | ||
modalpreview.src = pupurl; | modalpreview.src = pupurl; | ||
if (darkbasetoggle.checked) { | if (darkbasetoggle.checked) { | ||
basewolf.src = "/images/ | basewolf.src = "/images/2/29/Basewolfdark_pup.png"; | ||
} else { | } else { | ||
basewolf.src = "/images/0/09/Basewolf_puppy.png"; | basewolf.src = "/images/0/09/Basewolf_puppy.png"; | ||
Line 228: | Line 228: | ||
modalpreview.src = pupbrachyurl; | modalpreview.src = pupbrachyurl; | ||
if (darkbasetoggle.checked) { | if (darkbasetoggle.checked) { | ||
basewolf.src = "/images/ | basewolf.src = "/images/f/f1/Basewolfdark_brachycephaly.png"; | ||
} else { | } else { | ||
basewolf.src = "/images/3/31/Basewolf_brachy.png"; | basewolf.src = "/images/3/31/Basewolf_brachy.png"; | ||
Line 235: | Line 235: | ||
modalpreview.src = pupconjoinedurl; | modalpreview.src = pupconjoinedurl; | ||
if (darkbasetoggle.checked) { | if (darkbasetoggle.checked) { | ||
basewolf.src = "/images/ | basewolf.src = "/images/3/3a/Basewolfdark_conjoined.png"; | ||
} else { | } else { | ||
basewolf.src = "/images/4/46/Basewolf_conjoinedtwins.png"; | basewolf.src = "/images/4/46/Basewolf_conjoinedtwins.png"; | ||
Line 242: | Line 242: | ||
modalpreview.src = pupnewbornurl; | modalpreview.src = pupnewbornurl; | ||
if (darkbasetoggle.checked) { | if (darkbasetoggle.checked) { | ||
basewolf.src = "/images/ | basewolf.src = "/images/b/b6/Basewolfdark_pupnewborn.png"; | ||
} else { | } else { | ||
basewolf.src = "/images/7/7f/Basewolf_newbornpuppy.png"; | basewolf.src = "/images/7/7f/Basewolf_newbornpuppy.png"; | ||
Line 249: | Line 249: | ||
modalpreview.src = puppolycurl; | modalpreview.src = puppolycurl; | ||
if (darkbasetoggle.checked) { | if (darkbasetoggle.checked) { | ||
basewolf.src = "/images/ | basewolf.src = "/images/e/e0/Basewolfdark_polycephaly.png"; | ||
} else { | } else { | ||
basewolf.src = "/images/b/b5/Basewolf_polycephaly.png"; | basewolf.src = "/images/b/b5/Basewolf_polycephaly.png"; | ||
Line 256: | Line 256: | ||
modalpreview.src = puppolymurl; | modalpreview.src = puppolymurl; | ||
if (darkbasetoggle.checked) { | if (darkbasetoggle.checked) { | ||
basewolf.src = "/images/ | basewolf.src = "/images/a/a4/Basewolfdark_polymelia.png"; | ||
} else { | } else { | ||
basewolf.src = "/images/6/6a/Basewolf_polymelia.png"; | basewolf.src = "/images/6/6a/Basewolf_polymelia.png"; | ||
Line 263: | Line 263: | ||
modalpreview.src = pupsirenurl; | modalpreview.src = pupsirenurl; | ||
if (darkbasetoggle.checked) { | if (darkbasetoggle.checked) { | ||
basewolf.src = "/images/ | basewolf.src = "/images/c/c6/Basewolfdark_siren.png"; | ||
} else { | } else { | ||
basewolf.src = "/images/3/39/Basewolf_sirenomelia.png"; | basewolf.src = "/images/3/39/Basewolf_sirenomelia.png"; | ||
Line 270: | Line 270: | ||
modalpreview.src = pupyoungurl; | modalpreview.src = pupyoungurl; | ||
if (darkbasetoggle.checked) { | if (darkbasetoggle.checked) { | ||
basewolf.src = "/images/ | basewolf.src = "/images/2/25/Basewolfdark_pupyoung.png"; | ||
} else { | } else { | ||
basewolf.src = "/images/0/0c/Basewolf_youngpuppy.png"; | basewolf.src = "/images/0/0c/Basewolf_youngpuppy.png"; | ||
Line 292: | Line 292: | ||
basewolf.src = "/images/e/e2/Basewolfdark_adult.png"; | basewolf.src = "/images/e/e2/Basewolfdark_adult.png"; | ||
} else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Motherly]") { | } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Motherly]") { | ||
basewolf.src = "/images/ | basewolf.src = "/images/e/e9/Basewolfdark_motherly.png"; | ||
} else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Relaxed]") { | } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Relaxed]") { | ||
basewolf.src = "/images/ | basewolf.src = "/images/d/de/Basewolfdark_relaxed.png"; | ||
} else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Sentinel]") { | } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Sentinel]") { | ||
basewolf.src = "/images/ | basewolf.src = "/images/c/c7/Basewolfdark_sentinel.png"; | ||
} else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adolescent") { | } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adolescent") { | ||
basewolf.src = "/images/ | basewolf.src = "/images/4/48/Basewolfdark_adolescent.png"; | ||
} else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy") { | } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy") { | ||
basewolf.src = "/images/ | basewolf.src = "/images/2/29/Basewolfdark_pup.png"; | ||
} else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Brachycephaly]") { | } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Brachycephaly]") { | ||
basewolf.src = "/images/ | basewolf.src = "/images/f/f1/Basewolfdark_brachycephaly.png"; | ||
} else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Conjoined Twins]") { | } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Conjoined Twins]") { | ||
basewolf.src = "/images/ | basewolf.src = "/images/3/3a/Basewolfdark_conjoined.png"; | ||
} else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Newborn]") { | } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Newborn]") { | ||
basewolf.src = "/images/ | basewolf.src = "/images/b/b6/Basewolfdark_pupnewborn.png"; | ||
} else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polycephaly]") { | } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polycephaly]") { | ||
basewolf.src = "/images/ | basewolf.src = "/images/e/e0/Basewolfdark_polycephaly.png"; | ||
} else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polymelia]") { | } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polymelia]") { | ||
basewolf.src = "/images/ | basewolf.src = "/images/a/a4/Basewolfdark_polymelia.png"; | ||
} else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Sirenomelia]") { | } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Sirenomelia]") { | ||
basewolf.src = "/images/ | basewolf.src = "/images/c/c6/Basewolfdark_siren.png"; | ||
} else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Young]") { | } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Young]") { | ||
basewolf.src = "/images/ | basewolf.src = "/images/2/25/Basewolfdark_pupyoung.png"; | ||
} | } | ||
} else { | } else { |
Revision as of 06:16, 27 February 2024
$(function() { $('h2.c-header.active span.mw-headline').each(function () { var $header = $(this); var $headername = $header.html(); $headernameu = $headername.split(' ').join('_'); $headernameu = $headernameu.toString().replace("'", "\\'").replace("?", "\\?").replace("!", "\\!").replace(",", "\\,"); var $secondheader = "#" + $headernameu + "_2"; var $editsection = $( $secondheader ).next().children('a').attr("href"); $header.after('[Edit]'); $header.next().css( 'font-size', '0.6em').css( 'margin-left', '1em'); $("a[href*='" + $secondheader + "']").hide(); }); }); $(function() { $('h2.c-header.hidden span.mw-headline').each(function () { var $header = $(this); var $headername = $header.html(); $headernameu = $headername.split(' ').join('_'); $headernameu = $headernameu.replace("'", "\\'").replace("?", "\\?").replace("!", "\\!"); var $secondheader = "#" + $headernameu + "_2"; var $editsection = $( $secondheader ).next().children('a').attr("href"); $header.after('[Edit]'); $header.next().css( 'font-size', '0.6em').css( 'margin-left', '1em'); $("a[href='" + $secondheader + "']").hide(); }); }); $(function() { $('h2.h-static span.mw-headline').each(function () { var $header = $(this); var $headername = $header.html(); $headernameu = $headername.split(' ').join('_'); $headernameu = $headernameu.replace("'", "\\'").replace("?", "\\?").replace("!", "\\!"); var $secondheader = "#" + $headernameu + "_2"; var $editsection = $( $secondheader ).next().children('a').attr("href"); $header.after('[Edit]'); $header.next().css( 'font-size', '0.6em').css( 'margin-left', '1em'); var $pagename = $('h1#firstHeading').html(); $pagenameu = $pagename.split(' ').join('_'); $toclink = "https://grousehouse.wiki/" + $pagenameu + $secondheader; $("a[href*='" + $secondheader + "']").hide(); }); }); $(function() { $('h3.c-header.active span.mw-headline').each(function () { var $header = $(this); var $headername = $header.html(); $headernameu = $headername.split(' ').join('_'); $headernameu = $headernameu.replace("'", "\\'").replace("?", "\\?").replace("!", "\\!"); var $secondheader = "#" + $headernameu + "_2"; var $editsection = $( $secondheader ).next().children('a').attr("href"); $header.after('[Edit]'); $header.next().css( 'font-size', '0.6em').css( 'margin-left', '1em'); $("a[href*='" + $secondheader + "']").hide(); }); }); $(function() { $('h3.c-header.hidden span.mw-headline').each(function () { var $header = $(this); var $headername = $header.html(); $headernameu = $headername.split(' ').join('_'); $headernameu = $headernameu.replace("'", "\\'").replace("?", "\\?").replace("!", "\\!"); var $secondheader = "#" + $headernameu + "_2"; var $editsection = $( $secondheader ).next().children('a').attr("href"); $header.after('[Edit]'); $header.next().css( 'font-size', '0.6em').css( 'margin-left', '1em'); var $pagename = $('h1#firstHeading').html(); $pagenameu = $pagename.split(' ').join('_'); $toclink = "https://grousehouse.wiki/" + $pagenameu + $secondheader; $("a[href*='" + $secondheader + "']").hide(); }); }); $(function() { $('h3.h-static span.mw-headline').each(function () { var $header = $(this); var $headername = $header.html(); $headernameu = $headername.split(' ').join('_'); $headernameu = $headernameu.replace("'", "\\'").replace("?", "\\?").replace("!", "\\!"); var $secondheader = "#" + $headernameu + "_2"; var $editsection = $( $secondheader ).next().children('a').attr("href"); $header.after('[Edit]'); $header.next().css( 'font-size', '0.6em').css( 'margin-left', '1em'); var $pagename = $('h1#firstHeading').html(); $pagenameu = $pagename.split(' ').join('_'); $toclink = "https://grousehouse.wiki/" + $pagenameu + $secondheader; $("a[href*='" + $secondheader + "']").hide(); }); }); /* Testing */ var modal = document.getElementById('decorModal'); var modalclose = document.getElementsByClassName('modalclose')[0]; var previewbutton = document.getElementById('previewbutton'); var modaldropdown = document.getElementById('previewoptions'); var modalpreview = document.getElementById('decorpreviewimg'); var decorpreviewbehind = document.getElementById('behinddecorpreviewimg'); var decorpreview = document.getElementById('decorpreview'); var backbutton = document.getElementById('back'); var previewinput = document.getElementById('previewinput'); var decorinfo = document.getElementById('decorinformation'); var basewolf = document.getElementById('previewbasewolf'); var decortitle = document.getElementById('decorname'); var togglemenu = document.getElementById('checkboxesbutton'); var checkboxes = document.getElementById('checkboxes'); var backgroundtoggle = document.getElementById('backgroundtoggle'); var darkbasetoggle = document.getElementById('darkbasetoggle'); var previewbackground = document.getElementById('previewbackground'); var decorthumbnail = document.getElementById('decorthumbnail'); var obtentionheader = document.getElementById('obtentionheader'); var obtention = document.getElementById('decorobtention'); function decorModal(decorname, decorthumb, decordesc, decorobt, adulturl, motherlyurl, relaxedurl, sentinelurl, adolurl, pupurl, pupbrachyurl, pupconjoinedurl, pupnewbornurl, puppolycurl, puppolymurl, pupsirenurl, pupyoungurl) { modal.style.display = "block"; modalpreview.src = adulturl; basewolf.src = "/images/4/47/Basewolf_adult.png"; decortitle.innerHTML = decorname; decorinfo.innerHTML = decordesc; decorthumbnail.src = decorthumb; decorobtention.innerHTML = decorobt; previewbutton.addEventListener("click", function() { modalpreview.style.display = "block"; backbutton.style.display = "block"; previewinput.style.display = "block"; decorpreview.style.display = "block"; togglemenu.style.display = "block"; decorthumbnail.style.display = "none"; obtentionheader.style.display = "none"; obtention.style.display = "none"; decorinformation.style.display = "none"; previewbutton.style.display = "none"; }); backbutton.addEventListener("click", function() { modalpreview.style.display = "none"; backbutton.style.display = "none"; previewinput.style.display = "none"; decorpreview.style.display = "none"; togglemenu.style.display = "none"; decorthumbnail.style.display = "block"; obtentionheader.style.display = "block"; obtention.style.display = "block"; decorinformation.style.display = "block"; previewbutton.style.display = "block"; }); modaldropdown.addEventListener("change", function() { if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult") { modalpreview.src = adulturl; if (darkbasetoggle.checked) { basewolf.src = "/images/e/e2/Basewolfdark_adult.png"; } else { basewolf.src = "/images/4/47/Basewolf_adult.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Motherly]") { modalpreview.src = motherlyurl; if (darkbasetoggle.checked) { basewolf.src = "/images/e/e9/Basewolfdark_motherly.png"; } else { basewolf.src = "/images/d/d7/Basewolf_motherly.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Relaxed]") { modalpreview.src = relaxedurl; if (darkbasetoggle.checked) { basewolf.src = "/images/d/de/Basewolfdark_relaxed.png"; } else { basewolf.src = "/images/6/67/Basewolf_relaxed.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Sentinel]") { modalpreview.src = sentinelurl; if (darkbasetoggle.checked) { basewolf.src = "/images/c/c7/Basewolfdark_sentinel.png"; } else { basewolf.src = "/images/e/e0/Basewolf_sentinel.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adolescent") { modalpreview.src = adolurl; if (darkbasetoggle.checked) { basewolf.src = "/images/4/48/Basewolfdark_adolescent.png"; } else { basewolf.src = "/images/7/78/Basewolf_adolescent.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy") { modalpreview.src = pupurl; if (darkbasetoggle.checked) { basewolf.src = "/images/2/29/Basewolfdark_pup.png"; } else { basewolf.src = "/images/0/09/Basewolf_puppy.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Brachycephaly]") { modalpreview.src = pupbrachyurl; if (darkbasetoggle.checked) { basewolf.src = "/images/f/f1/Basewolfdark_brachycephaly.png"; } else { basewolf.src = "/images/3/31/Basewolf_brachy.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Conjoined Twins]") { modalpreview.src = pupconjoinedurl; if (darkbasetoggle.checked) { basewolf.src = "/images/3/3a/Basewolfdark_conjoined.png"; } else { basewolf.src = "/images/4/46/Basewolf_conjoinedtwins.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Newborn]") { modalpreview.src = pupnewbornurl; if (darkbasetoggle.checked) { basewolf.src = "/images/b/b6/Basewolfdark_pupnewborn.png"; } else { basewolf.src = "/images/7/7f/Basewolf_newbornpuppy.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polycephaly]") { modalpreview.src = puppolycurl; if (darkbasetoggle.checked) { basewolf.src = "/images/e/e0/Basewolfdark_polycephaly.png"; } else { basewolf.src = "/images/b/b5/Basewolf_polycephaly.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polymelia]") { modalpreview.src = puppolymurl; if (darkbasetoggle.checked) { basewolf.src = "/images/a/a4/Basewolfdark_polymelia.png"; } else { basewolf.src = "/images/6/6a/Basewolf_polymelia.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Sirenomelia]") { modalpreview.src = pupsirenurl; if (darkbasetoggle.checked) { basewolf.src = "/images/c/c6/Basewolfdark_siren.png"; } else { basewolf.src = "/images/3/39/Basewolf_sirenomelia.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Young]") { modalpreview.src = pupyoungurl; if (darkbasetoggle.checked) { basewolf.src = "/images/2/25/Basewolfdark_pupyoung.png"; } else { basewolf.src = "/images/0/0c/Basewolf_youngpuppy.png"; } } }); checkboxesbutton.addEventListener("click", function() { if (checkboxes.style.display === "none") { checkboxes.style.display = "block"; } else { checkboxes.style.display = "none"; } }); darkbasetoggle.addEventListener("click", function() { if (darkbasetoggle.checked) { if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult") { basewolf.src = "/images/e/e2/Basewolfdark_adult.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Select a stage from the options below") { basewolf.src = "/images/e/e2/Basewolfdark_adult.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Motherly]") { basewolf.src = "/images/e/e9/Basewolfdark_motherly.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Relaxed]") { basewolf.src = "/images/d/de/Basewolfdark_relaxed.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Sentinel]") { basewolf.src = "/images/c/c7/Basewolfdark_sentinel.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adolescent") { basewolf.src = "/images/4/48/Basewolfdark_adolescent.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy") { basewolf.src = "/images/2/29/Basewolfdark_pup.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Brachycephaly]") { basewolf.src = "/images/f/f1/Basewolfdark_brachycephaly.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Conjoined Twins]") { basewolf.src = "/images/3/3a/Basewolfdark_conjoined.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Newborn]") { basewolf.src = "/images/b/b6/Basewolfdark_pupnewborn.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polycephaly]") { basewolf.src = "/images/e/e0/Basewolfdark_polycephaly.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polymelia]") { basewolf.src = "/images/a/a4/Basewolfdark_polymelia.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Sirenomelia]") { basewolf.src = "/images/c/c6/Basewolfdark_siren.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Young]") { basewolf.src = "/images/2/25/Basewolfdark_pupyoung.png"; } } else { if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult") { basewolf.src = "/images/4/47/Basewolf_adult.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Select a stage from the options below") { basewolf.src = "/images/4/47/Basewolf_adult.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Motherly]") { basewolf.src = "/images/d/d7/Basewolf_motherly.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Relaxed]") { basewolf.src = "/images/6/67/Basewolf_relaxed.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Sentinel]") { basewolf.src = "/images/e/e0/Basewolf_sentinel.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adolescent") { basewolf.src = "/images/7/78/Basewolf_adolescent.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy") { basewolf.src = "/images/0/09/Basewolf_puppy.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Brachycephaly]") { basewolf.src = "/images/3/31/Basewolf_brachy.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Conjoined Twins]") { basewolf.src = "/images/4/46/Basewolf_conjoinedtwins.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Newborn]") { basewolf.src = "/images/7/7f/Basewolf_newbornpuppy.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polycephaly]") { basewolf.src = "/images/b/b5/Basewolf_polycephaly.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polymelia]") { basewolf.src = "/images/6/6a/Basewolf_polymelia.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Sirenomelia]") { basewolf.src = "/images/3/39/Basewolf_sirenomelia.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Young]") { basewolf.src = "/images/0/0c/Basewolf_youngpuppy.png"; } } }); backgroundtoggle.addEventListener("click", function() { if (backgroundtoggle.checked) { previewbackground.src = "/images/2/21/Background_default.png"; } else { previewbackground.src = "/images/b/b5/Placeholderbackground.png"; } }); } function decorModalBehind(decorname, decorthumb, decordesc, decorobt, adulturl, motherlyurl, relaxedurl, sentinelurl, adolurl, pupurl, pupbrachyurl, pupconjoinedurl, pupnewbornurl, puppolycurl, puppolymurl, pupsirenurl, pupyoungurl) { modal.style.display = "block"; decorpreviewbehind.src = adulturl; basewolf.src = "/images/4/47/Basewolf_adult.png"; decortitle.innerHTML = decorname; decorinfo.innerHTML = decordesc; decorthumbnail.src = decorthumb; decorobtention.innerHTML = decorobt; previewbutton.addEventListener("click", function() { modalpreview.style.display = "block"; backbutton.style.display = "block"; previewinput.style.display = "block"; decorpreview.style.display = "block"; togglemenu.style.display = "block"; decorthumbnail.style.display = "none"; obtentionheader.style.display = "none"; obtention.style.display = "none"; decorinformation.style.display = "none"; previewbutton.style.display = "none"; }); backbutton.addEventListener("click", function() { modalpreview.style.display = "none"; backbutton.style.display = "none"; previewinput.style.display = "none"; decorpreview.style.display = "none"; togglemenu.style.display = "none"; decorthumbnail.style.display = "block"; obtentionheader.style.display = "block"; obtention.style.display = "block"; decorinformation.style.display = "block"; previewbutton.style.display = "block"; }); modaldropdown.addEventListener("change", function() { if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult") { decorpreviewbehind.src = adulturl; if (darkbasetoggle.checked) { basewolf.src = "/images/e/e2/Basewolfdark_adult.png"; } else { basewolf.src = "/images/4/47/Basewolf_adult.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Motherly]") { decorpreviewbehind.src = motherlyurl; if (darkbasetoggle.checked) { basewolf.src = "/images/d/d7/Basewolf_motherly.png"; } else { basewolf.src = "/images/d/d7/Basewolf_motherly.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Relaxed]") { decorpreviewbehind.src = relaxedurl; if (darkbasetoggle.checked) { basewolf.src = "/images/6/67/Basewolf_relaxed.png"; } else { basewolf.src = "/images/6/67/Basewolf_relaxed.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Sentinel]") { decorpreviewbehind.src = sentinelurl; if (darkbasetoggle.checked) { basewolf.src = "/images/e/e0/Basewolf_sentinel.png"; } else { basewolf.src = "/images/e/e0/Basewolf_sentinel.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adolescent") { decorpreviewbehind.src = adolurl; if (darkbasetoggle.checked) { basewolf.src = "/images/7/78/Basewolf_adolescent.png"; } else { basewolf.src = "/images/7/78/Basewolf_adolescent.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy") { decorpreviewbehind.src = pupurl; if (darkbasetoggle.checked) { basewolf.src = "/images/0/09/Basewolf_puppy.png"; } else { basewolf.src = "/images/0/09/Basewolf_puppy.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Brachycephaly]") { decorpreviewbehind.src = pupbrachyurl; if (darkbasetoggle.checked) { basewolf.src = "/images/3/31/Basewolf_brachy.png"; } else { basewolf.src = "/images/3/31/Basewolf_brachy.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Conjoined Twins]") { decorpreviewbehind.src = pupconjoinedurl; if (darkbasetoggle.checked) { basewolf.src = "/images/4/46/Basewolf_conjoinedtwins.png"; } else { basewolf.src = "/images/4/46/Basewolf_conjoinedtwins.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Newborn]") { decorpreviewbehind.src = pupnewbornurl; if (darkbasetoggle.checked) { basewolf.src = "/images/7/7f/Basewolf_newbornpuppy.png"; } else { basewolf.src = "/images/7/7f/Basewolf_newbornpuppy.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polycephaly]") { decorpreviewbehind.src = puppolycurl; if (darkbasetoggle.checked) { basewolf.src = "/images/b/b5/Basewolf_polycephaly.png"; } else { basewolf.src = "/images/b/b5/Basewolf_polycephaly.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polymelia]") { decorpreviewbehind.src = puppolymurl; if (darkbasetoggle.checked) { basewolf.src = "/images/6/6a/Basewolf_polymelia.png"; } else { basewolf.src = "/images/6/6a/Basewolf_polymelia.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Sirenomelia]") { decorpreviewbehind.src = pupsirenurl; if (darkbasetoggle.checked) { basewolf.src = "/images/3/39/Basewolf_sirenomelia.png"; } else { basewolf.src = "/images/3/39/Basewolf_sirenomelia.png"; } } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Young]") { decorpreviewbehind.src = pupyoungurl; if (darkbasetoggle.checked) { basewolf.src = "/images/0/0c/Basewolf_youngpuppy.png"; } else { basewolf.src = "/images/0/0c/Basewolf_youngpuppy.png"; } } }); checkboxesbutton.addEventListener("click", function() { if (checkboxes.style.display === "none") { checkboxes.style.display = "block"; } else { checkboxes.style.display = "none"; } }); darkbasetoggle.addEventListener("click", function() { if (darkbasetoggle.checked) { if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult") { basewolf.src = "/images/e/e2/Basewolfdark_adult.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Select a stage from the options below") { basewolf.src = "/images/e/e2/Basewolfdark_adult.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Motherly]") { basewolf.src = "/images/d/d7/Basewolf_motherly.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Relaxed]") { basewolf.src = "/images/6/67/Basewolf_relaxed.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Sentinel]") { basewolf.src = "/images/e/e0/Basewolf_sentinel.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adolescent") { basewolf.src = "/images/7/78/Basewolf_adolescent.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy") { basewolf.src = "/images/0/09/Basewolf_puppy.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Brachycephaly]") { basewolf.src = "/images/3/31/Basewolf_brachy.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Conjoined Twins]") { basewolf.src = "/images/4/46/Basewolf_conjoinedtwins.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Newborn]") { basewolf.src = "/images/7/7f/Basewolf_newbornpuppy.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polycephaly]") { basewolf.src = "/images/b/b5/Basewolf_polycephaly.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polymelia]") { basewolf.src = "/images/6/6a/Basewolf_polymelia.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Sirenomelia]") { basewolf.src = "/images/3/39/Basewolf_sirenomelia.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Young]") { basewolf.src = "/images/0/0c/Basewolf_youngpuppy.png"; } } else { if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult") { basewolf.src = "/images/4/47/Basewolf_adult.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Select a stage from the options below") { basewolf.src = "/images/4/47/Basewolf_adult.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Motherly]") { basewolf.src = "/images/d/d7/Basewolf_motherly.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Relaxed]") { basewolf.src = "/images/6/67/Basewolf_relaxed.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adult [Sentinel]") { basewolf.src = "/images/e/e0/Basewolf_sentinel.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Adolescent") { basewolf.src = "/images/7/78/Basewolf_adolescent.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy") { basewolf.src = "/images/0/09/Basewolf_puppy.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Brachycephaly]") { basewolf.src = "/images/3/31/Basewolf_brachy.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Conjoined Twins]") { basewolf.src = "/images/4/46/Basewolf_conjoinedtwins.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Newborn]") { basewolf.src = "/images/7/7f/Basewolf_newbornpuppy.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polycephaly]") { basewolf.src = "/images/b/b5/Basewolf_polycephaly.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Polymelia]") { basewolf.src = "/images/6/6a/Basewolf_polymelia.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Sirenomelia]") { basewolf.src = "/images/3/39/Basewolf_sirenomelia.png"; } else if (modaldropdown.options[modaldropdown.selectedIndex].text === "Puppy [Young]") { basewolf.src = "/images/0/0c/Basewolf_youngpuppy.png"; } } }); backgroundtoggle.addEventListener("click", function() { if (backgroundtoggle.checked) { previewbackground.src = "/images/2/21/Background_default.png"; } else { previewbackground.src = "/images/b/b5/Placeholderbackground.png"; } }); } window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; modaldropdown.selectedIndex = 0; decorpreviewbehind.src = " "; basewolf.src = " "; decorpreviewbehind.style.display = "none"; backbutton.style.display = "none"; previewinput.style.display = "none"; decorpreview.style.display = "none"; togglemenu.style.display = "none"; checkboxes.style.display = "none"; decorinformation.style.display = "block"; previewbutton.style.display = "block"; } else if (event.target === modalclose) { modal.style.display = "none"; modaldropdown.selectedIndex = 0; decorpreviewbehind.src = " "; basewolf.src = " "; decorpreviewbehind.style.display = "none"; backbutton.style.display = "none"; previewinput.style.display = "none"; decorpreview.style.display = "none"; togglemenu.style.display = "none"; checkboxes.style.display = "none"; decorinformation.style.display = "block"; previewbutton.style.display = "block"; } }