diff options
| author | s-ol <s+removethis@s-ol.nu> | 2020-12-03 16:38:43 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2020-12-03 16:38:43 +0000 |
| commit | e0a0b25f6586cdf1b1284d97bedadfce5535ba96 (patch) | |
| tree | 50cf646dc673faeda648e7135d84e46f2dbd5262 /root/$mmm/plugins/twitter | |
| parent | fix typo break text/html+interactive (diff) | |
| download | mmm-e0a0b25f6586cdf1b1284d97bedadfce5535ba96.tar.gz mmm-e0a0b25f6586cdf1b1284d97bedadfce5535ba96.zip | |
move plugins into root
Diffstat (limited to 'root/$mmm/plugins/twitter')
| -rw-r--r-- | root/$mmm/plugins/twitter/converts: text$moonscript -> table.moon | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/root/$mmm/plugins/twitter/converts: text$moonscript -> table.moon b/root/$mmm/plugins/twitter/converts: text$moonscript -> table.moon new file mode 100644 index 0000000..4821823 --- /dev/null +++ b/root/$mmm/plugins/twitter/converts: text$moonscript -> table.moon @@ -0,0 +1,21 @@ +import div, blockquote, a from require 'mmm.dom' +import iframe from require 'mmm.dom' + +{ + { + inp: 'URL -> twitter/tweet' + out: 'mmm/dom' + cost: -4 + transform: (href) => + user, id = assert (href\match 'twitter.com/([^/]-)/status/(%d*)'), "couldn't parse twitter/tweet URL: '#{href}'" + + iframe { + width: 550 + height: 560 + border: 0 + frameBorder: 0 + allowfullscreen: true + src: "//twitframe.com/show?url=https%3A%2F%2Ftwitter.com%2F#{user}%2F#{id}" + } + } +} |
