Browse Source

CategoryOverpass: when including repo assets, use data-src too

master
parent
commit
6d6d5ed7fb
  1. 2
      src/CategoryOverpass.js

2
src/CategoryOverpass.js

@ -220,7 +220,7 @@ CategoryOverpass.prototype.updateAssets = function (div) {
}
} else if (!src.match(/^(https?:|data:|\.|\/)/)) {
img.setAttribute('src', (typeof openstreetbrowserPrefix === 'undefined' ? './' : openstreetbrowserPrefix) +
'asset.php?repo=' + this.options.repositoryId + '&file=' + encodeURIComponent(img.getAttribute('src')))
'asset.php?repo=' + this.options.repositoryId + '&file=' + encodeURIComponent(img.getAttribute('data-src') || img.getAttribute('src')))
}
}
}

Loading…
Cancel
Save