Avoid mixed content warnings for the MapQuest logo
authorTom Hughes <tom@compton.nu>
Mon, 16 Feb 2015 21:48:08 +0000 (21:48 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 16 Feb 2015 21:48:08 +0000 (21:48 +0000)
app/assets/javascripts/index/directions/mapquest.js

index 935a1ca..112d17b 100644 (file)
@@ -28,7 +28,7 @@ function MapQuestEngine(id, vehicleParam) {
 
   return {
     id: id,
-    creditline: '<a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">',
+    creditline: '<a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="' + document.location.protocol + '//developer.mapquest.com/content/osm/mq_logo.png">',
     draggable: false,
 
     getRoute: function (points, callback) {