User:Maproom/common.js

importScript("User:PleaseStand/userinfo.js"); // Lets me see what rights users have. importScript('User:Matma Rex/VE killer.js'); // in

importScript("User:PleaseStand/userinfo.js");  // Lets me see what rights users have.
 
 importScript('User:Matma Rex/VE killer.js');
 
 // install [[User:Cacycle/wikEdDiff]] enhanced diff
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEdDiff.js&action=raw&ctype=text/javascript');


/* Usage: inserts an iframe into a div with id "mapdiv", in conjunction with Template:MapFrame
          for embeddable dynamic maps. Relies on HTML5 data parameters.  */                    

function insertIFrame() {
    var exhtml = '//tools.wmflabs.org/wikivoyage/w/poimap2.php?';
    // hide the map iframe by default - only show if gadget is enabled
    $('#mapwrap').show();
    var map = $('#mapdiv');
    if ( map.length ) {
        validateMap(map);
        var exsrc = exhtml+'lat='+map.data("lat")+'&lon='+map.data("long")
            +'&zoom='+map.data("zoom")+'&layer='+map.data("layer")+'&lang='+mw.config.get('wgContentLanguage')+'&name='+mw.config.get('wgPageName');
 
        var ifstr = '<iframe src="'+exsrc+'" width="'+map.data("width")+'" height="'+map.data("height")
            +'" style="border:0"></iframe>';
        map.html(ifstr);
        if ( map.data("layer").indexOf('M') < 0 ) {
            $('.vcard a').attr('href', function () { return this.href.replace('layer=M','layer='+map.data("layer")[0]) });
        }
    }
}

function validateMap(map) {
    if (!$.isNumeric(map.data("lat"))) map.data("lat", 51.47766);
    if (!$.isNumeric(map.data("long"))) map.data("long", -0.00115);
    if (!$.isNumeric(map.data("zoom")) && map.data("zoom") != 'auto') map.data("zoom", 14);
    if (!$.isNumeric(map.data("height"))) map.data("height", 420);
    if (!$.isNumeric(map.data("width"))) map.data("width", 420);
    if (map.data("layer").length > 8) map.data("layer", 'M');
}

jQuery(document).ready(insertIFrame);


//////////////////////////// The following section enables self-specified syntax colouring within the source editor.
//// Syntax colouring:
////syntax highlighter
////syntax highlighter
//mw.loader.load('//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-DotsSyntaxHighlighter.js&action=raw&ctype=text/javascript');
//
//syntaxHighlighterConfig = { tagColor:      "#FF8888", 
//                            templateColor: "#FFBBBB",
//                            wikilinkColor: "#DDDDFF"  }
//


// The following section makes the "Compare selected revisions" button on an article history page work as expected when ctrl-clicked.
// Thanks to Guycn2

mw.loader.load("//he.wikipedia.org/w/index.php?title=MediaWiki:סקריפטים/35.js&action=raw&ctype=text/javascript");

// The following line ensures that (when logged in) I always get the desktop version of Wikipedia.
mw.loader.load("https://en.wikipedia.org/w/index.php?title=User:%C3%9Ejarkur/NeverUseMobileVersion.js&action=raw&ctype=text/javascript");

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.