MediaWiki:Common.js: mudanças entre as edições

De Bloodstone Wiki
 
mSem resumo de edição
Linha 2: Linha 2:


/* Quag-Feira */
/* Quag-Feira */
/* 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 09h15min 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 */
$(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>');
});