aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhow <how@zoethical.com>2018-11-14 11:48:24 +0100
committerhow <how@zoethical.com>2018-11-14 11:48:24 +0100
commitaa3032f1074106a3472a8e8b25b0395ea2a52eb1 (patch)
treeb0d061008a9b38865d76fd539cd96de2ac7a72cc
parentf96eb3440b6f0af0524197210c49de0e45775adf (diff)
downloaddiscourse-pad-aa3032f1074106a3472a8e8b25b0395ea2a52eb1.tar.gz
v0.1.0
-rw-r--r--CHANGELOG.md17
-rw-r--r--README.md9
-rw-r--r--plugin.rb4
3 files changed, 24 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..f953925
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,17 @@
+# Change Log
+
+## [UNRELEASED]
+
+(nothing yet)
+
+## 0.1.0 -- 2018-11-14
+
+- Limit pad URL to `https://pad.libreho.st/*`
+- Put in production at https://talk.libreho.st
+
+## 0.0.1 -- 2018-11-12
+
+- Fork from https://github.com/fuerst/embed-etherpad-lite
+- Point to https://pad.libreho.st/
+
+[unreleased]: /../compare/v0.1.0...HEAD
diff --git a/README.md b/README.md
index b3393d4..cb99cad 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,12 @@
# Embed codimd pads into Discourse for libreho.st
-This allows you to embed libreho.st pads into discourse. Its based on https://github.com/fuerst/embed-etherpad-lite which embeds pads into posts using the Onebox mechanism.
+This allows you to embed libreho.st pads into discourse. It is based on https://github.com/fuerst/embed-etherpad-lite which embeds pads into posts using the Onebox mechanism.
# Usage
-After installation just insert codimd links into your Discourse posts or comments. The Etherpad will be embedded using the famous and beloved [IFRAME](https://en.wikipedia.org/wiki/HTML_element#Frames) tag and is fully operational.
+**This is meant to use with <https://talk.libreho.st>. You need to fork and adapt to your case.**
+
+After installation just insert codimd links into your Discourse posts or comments. The pad will be embedded using the famous and beloved [IFRAME](https://en.wikipedia.org/wiki/HTML_element#Frames) tag and is fully operational.
# Installation
@@ -18,5 +20,4 @@ The configuration line you have to add to your container's app.yml file looks li
# Details
-The plugin uses the ["Brand new plugin interface"](https://meta.discourse.org/t/brand-new-plugin-interface/8793/88) to change URL's like `http(s)://domain.tld/pad-id` into HTML code like `<iframe src='http(s)://domain.tld/pad-id'></iframe>`.
-
+The plugin uses the ["Brand new plugin interface"](https://meta.discourse.org/t/brand-new-plugin-interface/8793/88) to change URL's like `http(s)://domain.example/pad-id` into HTML code like `<iframe src='http(s)://domain.example/pad-id'></iframe>`.
diff --git a/plugin.rb b/plugin.rb
index e0cbd8d..32b1303 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -6,8 +6,8 @@
class Onebox::Engine::CodimdOnebox
include Onebox::Engine
- #we only want to match for a specific codimd domain
- matches_regexp /pad.libreho.st/
+ # we only want to match for a specific codimd domain
+ matches_regexp %r{\Ahttps://pad\.libreho\.st/}
def to_html
"<iframe name='embed_readwrite' src='#{@url}' style='border-width:0' frameborder='0' scrolling='no' width='100%' height=600></iframe><br><a href='#{@url}' target='_blank'>Goto this Pad</a>"