MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus SchnuppTrupp
(Für den Turm-Rechner (von Aggroblut)) |
|||
Zeile 33: | Zeile 33: | ||
map_is_open.focus(); | map_is_open.focus(); | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } |
Aktuelle Version vom 17. April 2018, 16:34 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */ function rskpopup (url,t_name,x,y) { var lat = url.match(/c1=[0-9]+[NS]+[0-9]+/); var lng = url.match(/c2=[0-9]+[OW]+[0-9]+/); var map = url.match(/map=[RU]+[0-9]?/); var gomap=0; switch (map[0]) { case "map=R": gomap=0; break; case "map=U": gomap=1; break; case "map=U2": gomap=2; break; default: gomap=0; } var map_url = 'http://www.schnupptrupp.org/Weltkarte/google/Weltkarte.html?'+lat[0]+'&'+lng[0]+'&'+map[0]; var map_is_open = open ('','Weltkarte'); if (map_is_open.location.href == 'about:blank'){ map_is_open.location = map_url; } else { lat=lat[0].match(/[0-9]+[NS]+[0-9]+/); lng=lng[0].match(/[0-9]+[OW]+[0-9]+/); var rspoint = map_is_open.RunescapeLatLngtoEuclidianLatLng(lat[0],lng[0]); map_is_open.wikimarker.setPosition(rspoint); map_is_open.switchLayer(gomap) map_is_open.EuclideanMap.setZoom(6); map_is_open.EuclideanMap.panTo(rspoint); map_is_open.focus(); } }