From de8fa0507934e053c7bc6efbc455627246979056 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Sat, 21 Oct 2017 13:41:05 +0200 Subject: Potential fix for #2 --- assets/javascripts/iframe_whitelist.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/javascripts/iframe_whitelist.js b/assets/javascripts/iframe_whitelist.js index 1ed5e80..a7aa880 100644 --- a/assets/javascripts/iframe_whitelist.js +++ b/assets/javascripts/iframe_whitelist.js @@ -1,3 +1,4 @@ (function() { + if (Discourse.dialect_deprecated) { return; } Discourse.Markdown.whiteListIframe(/^(https?:)?\/\/www\.openstreetmap\.org\/export\/embed.html\?.+/i); })(); -- cgit v1.2.3 From 88f108f551836399b8f79b434a24e63db8d43d21 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Sat, 21 Oct 2017 16:52:36 +0200 Subject: Remove legacy code and update README Closes #2 --- README.md | 21 ++++++++++++++++----- assets/javascripts/iframe_whitelist.js | 4 ---- plugin.rb | 5 +---- 3 files changed, 17 insertions(+), 13 deletions(-) delete mode 100644 assets/javascripts/iframe_whitelist.js diff --git a/README.md b/README.md index c06b373..52cd9c9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ discourse-openstreetmap ======================= -Discourse plugin to support OSM via URL Oneboxing and iframe whitelisting - +> Discourse plugin to support OSM via URL Oneboxing ## Installation on top of Docker image @@ -24,9 +23,21 @@ Rebuild Discourse: `/var/discourse/launcher rebuild app` ### What URLs are oneboxed by this plugin? -`http://www.openstreetmap.org/?mlat=[Marker Latitude]&mlon=[Marker Longitude]#map=[Zoom Level]/[Latitude]/[Longitude]&layers=[Layer code]` + https://www.openstreetmap.org/?mlat=[Marker Latitude]&mlon=[Marker Longitude]#map=[Zoom Level]/[Latitude]/[Longitude]&layers=[Layer code] + +will be onboxed as a mini-map: + +> ![onebox-sample](https://user-images.githubusercontent.com/157609/31852642-79ace722-b67b-11e7-848f-41ba85fd80ef.png) + +### Can I just copy&paste `