Warning: proc_open(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/www/wwwroot/iadb.scy.la/:/tmp/) in /www/wwwroot/iadb.scy.la/mediawiki-1.43.0/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 161

Warning: proc_open(/dev/null): Failed to open stream: Operation not permitted in /www/wwwroot/iadb.scy.la/mediawiki-1.43.0/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 161
模块:隐藏文字 - IADb 跳转到内容

模块:隐藏文字

来自IADb
Paryan留言 | 贡献2025年3月22日 (六) 09:27的版本 (创建页面,内容为“local p = {} function p.spoiler(frame) local args = frame.args local header = args[1] or "点击显示隐藏内容" local content = args[2] or "" return string.format([[ <div class="spoiler"> <div class="spoiler-header" onclick="this.nextElementSibling.style.display = this.nextElementSibling.style.display === 'none' ? 'block' : 'none';"> %s </div> <div class="spoiler-content" style="display:none;"> %s </div> </div> ]], header,…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

此模块的文档可以在模块:隐藏文字/doc创建

脚本错误:Lua错误:无法创建进程:proc_open(/dev/null): Failed to open stream: Operation not permitted

local p = {}

function p.spoiler(frame)
    local args = frame.args
    local header = args[1] or "点击显示隐藏内容"
    local content = args[2] or ""

    return string.format([[
<div class="spoiler">
  <div class="spoiler-header" onclick="this.nextElementSibling.style.display = this.nextElementSibling.style.display === 'none' ? 'block' : 'none';">
    %s
  </div>
  <div class="spoiler-content" style="display:none;">
    %s
  </div>
</div>
]], header, content)
end

return p