将主题转化为互动小说 ;)

:information_source: 在此查看此内容的插件版本:Discourse Frotz 🧙

在将 URL 加入白名单后,我将此 iframe 嵌入到 Lounge 的一篇帖子中,以增添一些乐趣。

结果?一篇完全可运行的经典互动小说作品嵌入在帖子中,看起来并不突兀 :slight_smile:(不过您需要手动滚动)。

原因?因为您可以这样做。

<iframe src="https://iplayif.com/?story=http%3A%2F%2Fwww.douglasadams.com%2Fcreations%2Fhhgg.z3" width="800" height="800" frameborder="0"></iframe>

如果您认为这存在安全漏洞,欢迎随时指出……但我相信 iplayif.com 是合法的,这是它的 GitHub 页面

如果您不是道格拉斯·亚当斯的粉丝,您可以在这里找到更多优秀作品

11 个赞

Thanks!

I hadn’t used the Admin / Settings / Security / allowed iframes config setting before, but putting in https://iplayif.com/ in there and adding that iframe into a post worked great.

3 个赞

Yeah, it’s amazing how seamless the result can look :slight_smile:

PS Please don’t let it distract you too much from your interesting project, though :wink:

Oh wauw - only just discovered this, but THANK YOU!

Well, there goes my Sunday …

1 个赞

Not sure how I just came across this but it’s lots of fun and combined with the Media Overlay component you can pop out the game and have it open as you continue browsing the rest of your forum, though you’ll want to make the iframe a little narrower so if doesn’t cover so much of the page. I found a width="400" works well

1 个赞

OK, I’ve taken this a bit further … watch this space :wink:

4 个赞

The above prototype is now released here Discourse Frotz

2 个赞

This is cool! I’m the maintainer of Parchment/iplayif.com, so it’s great to see it getting used.

Unfortunately I haven’t had the time or energy to work on it much recently. I would like to improve how it works when embedded in an iframe.

4 个赞

Hey @Dannii great to meet you. For the stories I tried it works very well save for the very minor scrolling issue. Thanks for your hard work to help keep all that great legacy alive!

1 个赞