MediaWiki:Common.js: mudanças entre as edições
De Bloodstone Wiki
mSem resumo de edição |
mSem resumo de edição |
||
Linha 15: | Linha 15: | ||
} | } | ||
$(".map_logobox",this).append('<a href="https://www.bloodstonewiki.com.br/wiki/mapa#'+coord+':1" class="map_logo" target="_blank" title="Ver no mapa do Bloodstone Wiki"></a>'); | $(".map_logobox",this).append('<a href="https://www.bloodstonewiki.com.br/wiki/mapa#'+coord+':1" class="map_logo" target="_blank" title="Ver no mapa do Bloodstone Wiki"></a>'); | ||
}); | |||
/* Tirar ícone de links externos */ | |||
$('.mapa > a').removeClass('external text'); | |||
$('#siteNotice a').removeClass('external text'); | |||
/* Tirar atributo title de links */ | |||
$('.tooltip > a').removeAttr('title'); | |||
/* Transcrições NPCs */ | |||
$(document).ready(function() { | |||
$('#show2, #show3').click(function() { | |||
$('.hide').toggle(); | |||
}); | |||
}); | |||
/* Mapa */ | |||
$(document).ready(function(){ | |||
var url = location.hash; | |||
$(".map_wiki").append('<iframe src="https://mapa.bloodstonewiki.com.br//'+url+'" scrolling="no" frameborder="0" width="800" height="500"></iframe>'); | |||
}); | |||
/* Mapa Popup */ | |||
$('.map_show').click(function() { | |||
var id = $(this).attr('id'); | |||
$('#div' + id).toggle(); | |||
$('.map_frame',this).toggle(); | |||
// alert(id); | |||
return false; | |||
}); | |||
$('.map_show').click(function() { | |||
var id = $(this).attr('id'); | |||
$('#div' + id).toggle(); | |||
$('.map_overlay',this).toggle(); | |||
// alert(id); | |||
return false; | |||
}); | |||
$('.map_logobox').click(function(event){ | |||
event.stopPropagation(); | |||
}); | |||
$('.map_show').one('click', function() { | |||
var url = location.host; | |||
var link = url.split('.'); | |||
var text = link[0]; | |||
var coord = $('.map_frame_coord',this).text() | |||
if (text == 'www') { | |||
$(".map_box",this).append('<iframe src="https://mapa.bloodstonewiki.com.br//#'+coord+':1" scrolling="no" frameborder="0" width="800" height="500"></iframe>'); | |||
} else { | |||
$(".map_box",this).append('<iframe src="https://mapa.bloodstonewiki.com.br//#'+coord+':1" scrolling="no" frameborder="0" width="800" height="500"></iframe>'); | |||
} | |||
$(".map_logobox",this).append('<a href="https://www.Bloodstonewiki.com.br/wiki/mapa#'+coord+':1" class="map_logo" target="_blank" title="Ver no mapa do Bloodstone Wiki"></a>'); | |||
}); | }); |
Edição das 12h21min de 11 de março de 2021
/* Códigos JavaScript aqui colocados serão carregados por todos aqueles que acessarem alguma página deste wiki */ /* Quag-Feira */ /*Mapa*/ $('.map_hunt').ready(function(){ var url = location.host; var link = url.split('.'); var text = link[0]; var coord = $('.map_hunt_coord',this).text() if (text == 'www') { $(".map_hunt_box",this).append('<iframe src="https://mapa.bloodstonewiki.com.br//#'+coord+':1" scrolling="no" frameborder="0" width="250" height="250" style="border-radius:12px"></iframe>'); } else { $(".map_hunt_box",this).append('<iframe src="https://mapa.bloodstonewiki.com.br//#'+coord+':1" scrolling="no" frameborder="0" width="250" height="250" style="border-radius:12px"></iframe>'); } $(".map_logobox",this).append('<a href="https://www.bloodstonewiki.com.br/wiki/mapa#'+coord+':1" class="map_logo" target="_blank" title="Ver no mapa do Bloodstone Wiki"></a>'); }); /* Tirar ícone de links externos */ $('.mapa > a').removeClass('external text'); $('#siteNotice a').removeClass('external text'); /* Tirar atributo title de links */ $('.tooltip > a').removeAttr('title'); /* Transcrições NPCs */ $(document).ready(function() { $('#show2, #show3').click(function() { $('.hide').toggle(); }); }); /* Mapa */ $(document).ready(function(){ var url = location.hash; $(".map_wiki").append('<iframe src="https://mapa.bloodstonewiki.com.br//'+url+'" scrolling="no" frameborder="0" width="800" height="500"></iframe>'); }); /* Mapa Popup */ $('.map_show').click(function() { var id = $(this).attr('id'); $('#div' + id).toggle(); $('.map_frame',this).toggle(); // alert(id); return false; }); $('.map_show').click(function() { var id = $(this).attr('id'); $('#div' + id).toggle(); $('.map_overlay',this).toggle(); // alert(id); return false; }); $('.map_logobox').click(function(event){ event.stopPropagation(); }); $('.map_show').one('click', function() { var url = location.host; var link = url.split('.'); var text = link[0]; var coord = $('.map_frame_coord',this).text() if (text == 'www') { $(".map_box",this).append('<iframe src="https://mapa.bloodstonewiki.com.br//#'+coord+':1" scrolling="no" frameborder="0" width="800" height="500"></iframe>'); } else { $(".map_box",this).append('<iframe src="https://mapa.bloodstonewiki.com.br//#'+coord+':1" scrolling="no" frameborder="0" width="800" height="500"></iframe>'); } $(".map_logobox",this).append('<a href="https://www.Bloodstonewiki.com.br/wiki/mapa#'+coord+':1" class="map_logo" target="_blank" title="Ver no mapa do Bloodstone Wiki"></a>'); });