MediaWiki:FandomMobile.js
Jump to navigation
Jump to search
In other languages: Español • Polski • Русский • Українська
CSS and Javascript changes must comply with the wiki design rules.
Note: After saving, 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: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Clear the cache in Tools → Preferences
$(function() {
$.when(
$('.spoiler').each(function() {
$(this).css({'position': 'relative'});
$(this).append(
$('<div>').append(
$('<div>', {
text: ' Spoiler alert!'
}).prepend(
$('<img>', {
'src': 'https://static.wikia.nocookie.net/deadcells_gamepedia_en/images/c/c0/Exclamation.png/revision/latest/scale-to-width-down/15?cb=20210304214608'
})
).css({'color': '#d1394e', 'font-weight': 'bold', 'font-size': '20px'}),
$('<a>', {
'class': 'spoiler-text',
href: 'javascript:void(0)',
text: 'Tap to reveal'
})
).css({'position': 'absolute', 'inset': '0px', 'background-color': 'black', 'display': 'flex', 'justify-content': 'center', 'flex-flow': 'column wrap', 'align-items': 'center'})
);
})
).done(function() {
$('.spoiler-text').click(function() {
$(this).parent().fadeOut("400", function() {
$(this).remove();
});
});
});
} );