« Utilisateur:Maxim21/common.js » : différence entre les versions
m Une matinée entière à faire cette ânerie, et je continue... |
mAucun résumé des modifications |
||
| Ligne 15 : | Ligne 15 : | ||
includeJs('http://nuvapedia.fr/leaflet-0.7.3/leaflet.js'); | includeJs('http://nuvapedia.fr/leaflet-0.7.3/leaflet.js'); | ||
includeCss('http://nuvapedia.fr/leaflet-0.7.3/leaflet.css'); | includeCss('http://nuvapedia.fr/leaflet-0.7.3/leaflet.css'); | ||
includeJs('http://nuvapedia.fr/maps.jps'); | |||
Version du 31 janvier 2015 à 14:32
function includeJs(path) {
var newJsInclude = document.createElement('script');
newJsInclude.setAttribute('src', path);
document.body.appendChild(newJsInclude);
}
function includeCss(path) {
var newStyleInclude = document.createElement('link');
newStyleInclude.setAttribute('rel', 'stylesheet');
newStyleInclude.setAttribute('type', 'text/css');
newStyleInclude.setAttribute('href', path);
document.getElementsByTagName('head')[0].appendChild(newStyleInclude);
}
includeJs('http://nuvapedia.fr/leaflet-0.7.3/leaflet.js');
includeCss('http://nuvapedia.fr/leaflet-0.7.3/leaflet.css');
includeJs('http://nuvapedia.fr/maps.jps');