MediaWiki:Common.js

De Bloodstone Wiki
Revisão de 09h22min de 11 de março de 2021 por Megalhoes (discussão | contribs)

Nota: Após publicar, você pode ter que limpar o "cache" do seu navegador para ver as alterações.

  • Firefox / Safari: Pressione Shift enquanto clica Recarregar, ou pressione Ctrl-F5 ou Ctrl-R (⌘-R no Mac)
  • Google Chrome: Pressione Ctrl-Shift-R (⌘-Shift-R no Mac)
  • Internet Explorer/Edge: PressioneCtrl enquanto clica Recarregar, ou Pressione Ctrl-F5
  • Opera: Pressione Ctrl-F5.
/* 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>');
});


/* Mapa Infobox Hunt */

$('.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://mapa.bloodstonewiki.com.br/#'+coord+':1" class="map_logo" target="_blank" title="Ver no mapa do Bloodstone Wiki"></a>');
    }

);