Widget:costumeSwitcher: Difference between revisions
Jump to navigation
Jump to search
Pianoforte (talk | contribs) No edit summary |
Pianoforte (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
costumeSelection = document.getElementById("costumeSelection").value; | costumeSelection = document.getElementById("costumeSelection").value; | ||
costumePaths = costumeSelection,split(); | |||
$("# | $("#fullart a").attr("href", costumeSelection[0]); | ||
$("#fullart_D a | $("#fullart a img").attr("src", costumeSelection[0]); | ||
$("#fullart_D a img").attr("alt", | $("#fullart a img").attr("alt", costumeSelection[0]); | ||
$("#fullart_D a").attr("href", costumeSelection[1]); | |||
$("#fullart_D a img").attr("src", costumeSelection[1]); | |||
$("#fullart_D a img").attr("alt", costumeSelection[1]); | |||
//$("#fullart a img").attr("srcset", "/wiki/Special:Redirect/file/Springfield" + costumeSelection + ".png 1.5x, /wiki/Special:Redirect/file/Springfield" + costumeSelection + ".png 2x"); | //$("#fullart a img").attr("srcset", "/wiki/Special:Redirect/file/Springfield" + costumeSelection + ".png 1.5x, /wiki/Special:Redirect/file/Springfield" + costumeSelection + ".png 2x"); | ||
$(".tdoll_chibi").attr("src", | $(".tdoll_chibi").attr("src", costumeSelection[2]); | ||
// As we change the link, we have to update the Thumb-Cache of the Media Viewer | // As we change the link, we have to update the Thumb-Cache of the Media Viewer | ||
Line 36: | Line 38: | ||
</script> | </script> | ||
<select id="costumeSelection" onchange="swap_costume()"> | <select id="costumeSelection" onchange="swap_costume()"> | ||
<option value={ | <option value="<!--{$defaultpaths|escape:'html'}-->" selected="selected">Default</option> | ||
<option value="_mod"> | <option value="_mod">Mod</option> | ||
<option value=" | <option value="<!--{$costume1paths|escape:'html'}-->"><!--{$costume1|escape:'html'}--></option> | ||
<option value=" | <option value="<!--{$costume2paths|escape:'html'}-->"><!--{$costume2|escape:'html'}--></option> | ||
<option value=" | <option value="<!--{$costume3paths|escape:'html'}-->"><!--{$costume3|escape:'html'}--></option> | ||
</select> | </select> | ||
</includeonly> | </includeonly> | ||
Line 58: | Line 52: | ||
{{#widget:costumeSwitcher | {{#widget:costumeSwitcher | ||
| | |defaultpaths={{filepath:Springfield.png|420}},,{{filepath:Springfield_D.png|420}},,{{filepath:Springfield_S.png|420}},,{{filepath:Springfield_chibi.png|420}} | ||
|costume1=test1 | |costume1=test1 | ||
| | |costume1paths={{filepath:Springfield_costume1.png|420}},,{{filepath:Springfield_costume1_D.png|420}},,{{filepath:Springfield_costume1_S.png|420}},,{{filepath:Springfield_costume1_chibi.png|420}} | ||
|costume2=test2 | |costume2=test2 | ||
| | |costume2paths={{filepath:Springfield_costume2.png|420}},,{{filepath:Springfield_costume2_D.png|420}},,{{filepath:Springfield_costume2_S.png|420}},,{{filepath:Springfield_costume2_chibi.png|420}} | ||
|costume3=test3 | |costume3=test3 | ||
| | |costume3paths={{filepath:Springfield_costume3.png|420}},,{{filepath:Springfield_costume3_D.png|420}},,{{filepath:Springfield_costume3_S.png|420}},,{{filepath:Springfield_costume3_chibi.png|420}} | ||
}} | }} | ||