User:1Maven/sandbox

From Guild Wars 2 Wiki
Jump to navigationJump to search

Trying to figure out how to display current gems per 100 gold

<script src="https://api.guildwars2.com/v2/commerce/exchange/gems?quantity=100"></script> <style> .quantity-container {

   background: #000000;

} </style> <script type="text/javascript"> var fileref=document.createElement("link")

 fileref.setAttribute("coins_per_gem", "text/css")
 fileref.setAttribute("quantity", "text/css")
 fileref.setAttribute("href", "https://api.guildwars2.com/v2/commerce/exchange/gems?quantity=100");

document.getElementsByTagName("head")[0].appendChild(fileref);

var map;

function unproject(coord) {

   return map.unproject(coord, map.getMaxZoom());

}

function onMapClick(e) {

   console.log("You clicked the map at " + map.project(e.latlng));

}