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

: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 个赞

不确定我是怎么偶然发现这个的,但它非常有趣。结合 https://meta.discourse.org/t/media-overlay-component/81418,你可以将游戏弹出并保持在打开状态,同时继续浏览论坛的其他内容。不过,你最好将 iframe 设置得窄一些,以免它占据太多页面空间。我发现设置 width="400" 效果很好。

1 个赞

好的,我把这个稍微推进了一点……敬请期待;)

4 个赞

上述原型现已发布于此:Discourse Frotz 🧙 - #2 by merefield

2 个赞

太棒了!我是 Parchment/iplayif.com 的维护者,很高兴看到它被广泛使用。

遗憾的是,最近我既没有时间也没有精力投入太多精力去开发。我希望能够改进它在 iframe 中嵌入时的表现。

4 个赞

你好 @Dannii,很高兴认识你。对于故事功能,我试过了,效果非常好,只存在非常轻微的滚动问题。感谢你付出的辛勤努力,让那些珍贵的经典得以延续!

1 个赞