gwmaps / Guild-Wars-2-WikiMaps

A widget to show maps in MediaWiki using the Guild Wars 2 API
http://wiki-de.guildwars2.com/wiki/Widget:Karte
3 stars 2 forks source link

I did a few updates to the files if you want to use it. Not a bug, just help. #1

Closed mer8771 closed 8 years ago

mer8771 commented 8 years ago

The first update is the the Common.js file. Just copy from the first /\ to the end }); It updated cloudflare versions. /**

jQuery(document).ready(function(){ if($(".gw2map").length){ $.each([ "//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.css", /* Updated version / "https://d1h9a8s8eodvjz.cloudfront.net/fonts/menomonia/08-02-12/menomonia.css", "https://d1h9a8s8eodvjz.cloudfront.net/fonts/menomonia/08-02-12/menomonia-italic.css" ], function(){ var ref = document.createElement("link"); ref.setAttribute("rel", "stylesheet"); ref.setAttribute("href", this); document.getElementsByTagName("head")[0].appendChild(ref); }); $.ajax("//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.js", {cache:true, dataType:"script"}).done(function(){ / Updated version / / * You'll need to change the link to the actual URL where the widget's JS is stored. * For easy maintenance it's a good idea to store it somewhere in the Widget namespace. * You can find the latest (minified) versions including polyline decorator and the PhpJS excerpts on the german GW2 wiki: * //wiki-de.guildwars2.com/index.php?title=Widget:Karte/JS&action=raw&ctype=text/javascript */ $.ajax("js/gw2wikimaps.js", {cache:true, dataType:"script"}).done(function(){ $(".gw2map").each(function(){ GW2Maps.init(this); }); }); }); } });

The second is in the Common.css file. I add the missing class attribute for the body tag. just add this to the Common.css if you haven't already.

.map {

}

The 3erd is in the Common.html file. I updated the hosted jQuery version. find and replace with this.

Yes it's easy stuff but for new people it may help.

mer8771 commented 8 years ago

Trolled by markdown! LOL

codemasher commented 8 years ago

Hey, thanks for your contribution. I haven't touched this repo in ages, because the GW2 API v2 (especially the maps part) is still work in progress and unfinished. The v1 is pretty much unusable for wiki purposes - i'll rewrite the widget from scratch when v2 is done. ;)