aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2020-06-30 11:05:06 +0200
committerhellekin <hellekin@cepheide.org>2020-06-30 11:05:06 +0200
commit7e07ba4bacc9c087f87a154b1cd74cb84b61ef0a (patch)
tree78a82cb28ff6e9cf9bac61adaf22f8c17740dbbe
parent20a073975568783711566f9d86bd0512ae92f1f8 (diff)
downloaddiscourse-pad-7e07ba4bacc9c087f87a154b1cd74cb84b61ef0a.tar.gz
Adapt to support pad.public.cat
-rw-r--r--README.md9
-rw-r--r--plugin.rb4
2 files changed, 7 insertions, 6 deletions
diff --git a/README.md b/README.md
index cb99cad..c433ef9 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,11 @@
-# Embed codimd pads into Discourse for libreho.st
+# Embed codimd pads into Discourse for public.cat
-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.
+This allows you to embed publi.cat pads into discourse.
+It is a fork of [Librehost's version](https://lab.libreho.st/librehosters/embed-codimd.git) inspired by https://github.com/fuerst/embed-etherpad-lite which embeds pads into posts using the Onebox mechanism.
# Usage
-**This is meant to use with <https://talk.libreho.st>. You need to fork and adapt to your case.**
+**This is meant to use with pads at <https://pad.public.cat>. 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.
@@ -15,7 +16,7 @@ Read [Install a Plugin](https://meta.discourse.org/t/install-a-plugin/19157) at
The configuration line you have to add to your container's app.yml file looks like:
```
-- git clone https://lab.libreho.st/librehosters/embed-codimd.git
+- git clone https://code.cepheide.org/embed-codimd.git
```
# Details
diff --git a/plugin.rb b/plugin.rb
index 32b1303..c8c1a18 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -7,9 +7,9 @@
class Onebox::Engine::CodimdOnebox
include Onebox::Engine
# we only want to match for a specific codimd domain
- matches_regexp %r{\Ahttps://pad\.libreho\.st/}
+ matches_regexp %r{\Ahttps://pad\.public\.cat/}
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>"
+ "<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'>Go to this Pad</a>"
end
end