MediaWiki:Gadget-CastSwitch.js
Jump to navigation
Jump to search
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// English Cast Button
$(function() {
$('.mw-englishButton').html($('<a>', {
'class': 'mw-ui-button',
text: 'English'
})).click(function() {
$('.cast-va').attr('style', 'display: none !important');
$('.en-va').attr('style', 'display: block !important');
}
)});
// Japanese Cast Button
$(function() {
$('.mw-japaneseButton').html($('<a>', {
'class': 'mw-ui-button',
text: 'Japanese'
})).click(function() {
$('.cast-va').attr('style', 'display: none !important');
$('.jp-va').attr('style', 'display: block !important');
}
)});
// French Cast Button
$(function() {
$('.mw-frenchButton').html($('<a>', {
'class': 'mw-ui-button',
text: 'French'
})).click(function() {
$('.cast-va').attr('style', 'display: none !important');
$('.fr-va').attr('style', 'display: block !important');
}
)});
// Spanish Cast (Spain) Button
$(function() {
$('.mw-spanishButton').html($('<a>', {
'class': 'mw-ui-button',
text: 'Spanish (European)'
})).click(function() {
$('.cast-va').attr('style', 'display: none !important');
$('.sp-va').attr('style', 'display: block !important');
}
)});
// Spanish Cast (Latin America) Button
$(function() {
$('.mw-spanishLatinButton').html($('<a>', {
'class': 'mw-ui-button',
text: 'Spanish (Latin American)'
})).click(function() {
$('.cast-va').attr('style', 'display: none !important');
$('.la-va').attr('style', 'display: block !important');
}
)});
// Italian Cast Button
$(function() {
$('.mw-italianButton').html($('<a>', {
'class': 'mw-ui-button',
text: 'Italian'
})).click(function() {
$('.cast-va').attr('style', 'display: none !important');
$('.it-va').attr('style', 'display: block !important');
}
)});
// German Cast Button
$(function() {
$('.mw-germanButton').html($('<a>', {
'class': 'mw-ui-button',
text: 'German'
})).click(function() {
$('.cast-va').attr('style', 'display: none !important');
$('.de-va').attr('style', 'display: block !important');
}
)});
// Portuguese Cast Button
$(function() {
$('.mw-portugueseButton').html($('<a>', {
'class': 'mw-ui-button',
text: 'Portuguese'
})).click(function() {
$('.cast-va').attr('style', 'display: none !important');
$('.pt-va').attr('style', 'display: block !important');
}
)});
// Thai Cast Button
$(function() {
$('.mw-thaiButton').html($('<a>', {
'class': 'mw-ui-button',
text: 'Thai'
})).click(function() {
$('.cast-va').attr('style', 'display: none !important');
$('.th-va').attr('style', 'display: block !important');
}
)});
// Active Skill Button
$(function() {
$('.mw-ActiveSkill').html($('<a>', {
'class': 'mw-ui-button',
text: 'Active Skill'
})).click(function() {
$('.tos-Skills').attr('style', 'display: none !important');
$('.tos-ActiveSkill').attr('style', 'display: block !important');
}
)});
// Leader Skill Button
$(function() {
$('.mw-LeaderSkill').html($('<a>', {
'class': 'mw-ui-button',
text: 'Leader Skill'
})).click(function() {
$('.tos-Skills').attr('style', 'display: none !important');
$('.tos-LeaderSkill').attr('style', 'display: block !important');
}
)});
// Team Skill Button
$(function() {
$('.mw-TeamSkill').html($('<a>', {
'class': 'mw-ui-button',
text: 'Team Skill'
})).click(function() {
$('.tos-Skills').attr('style', 'display: none !important');
$('.tos-TeamSkill').attr('style', 'display: block !important');
}
)});
// Bond Skill Button
$(function() {
$('.mw-BondSkill').html($('<a>', {
'class': 'mw-ui-button',
text: 'Bond Skill'
})).click(function() {
$('.tos-Skills').attr('style', 'display: none !important');
$('.tos-BondSkill').attr('style', 'display: block !important');
}
)});
// JORGE JOESTAR (All Characters)
$(function() {
$('.mw-jj-all').html($('<a>', {
'class': 'mw-ui-button',
text: 'Show All'
})).click(function() {
$('.jj-1st').css('display', 'flex');
$('.jj-2nd').css('display', 'flex');
$('.jj-37th').css('display', 'flex');
$('.jj-unknown').css('display', 'flex');
}
)});
// JORGE JOESTAR (1st Universe)
$(function() {
$('.mw-jj-1st').html($('<a>', {
'class': 'mw-ui-button',
text: 'Original Universe'
})).click(function() {
$('.jj-1st').css('display', 'flex');
$('.jj-2nd').css('display', 'none');
$('.jj-37th').css('display', 'none');
$('.jj-unknown').css('display', 'none');
}
)});
// JORGE JOESTAR (2nd Universe)
$(function() {
$('.mw-jj-2nd').html($('<a>', {
'class': 'mw-ui-button',
text: 'Second Universe'
})).click(function() {
$('.jj-1st').css('display', 'none');
$('.jj-2nd').css('display', 'flex');
$('.jj-37th').css('display', 'none');
$('.jj-unknown').css('display', 'none');
}
)});
// JORGE JOESTAR (37th Universe)
$(function() {
$('.mw-jj-37th').html($('<a>', {
'class': 'mw-ui-button',
text: '37th Universe'
})).click(function() {
$('.jj-1st').css('display', 'none');
$('.jj-2nd').css('display', 'none');
$('.jj-37th').css('display', 'flex');
$('.jj-unknown').css('display', 'none');
}
)});
// JORGE JOESTAR (Unknown Universe)
$(function() {
$('.mw-jj-unknown').html($('<a>', {
'class': 'mw-ui-button',
text: 'Unknown Universe'
})).click(function() {
$('.jj-1st').css('display', 'none');
$('.jj-2nd').css('display', 'none');
$('.jj-37th').css('display', 'none');
$('.jj-unknown').css('display', 'flex');
}
)});