Module:Infobox interval: Difference between revisions
ArrowHead294 (talk | contribs) m ArrowHead294 moved page Module:Infobox Interval to Module:Infobox interval without leaving a redirect: WP:NCCAPS |
ArrowHead294 (talk | contribs) mNo edit summary |
||
| Line 4: | Line 4: | ||
local he = require("Module:Harmonic entropy") | local he = require("Module:Harmonic entropy") | ||
local infobox = require("Module:Infobox") | local infobox = require("Module:Infobox") | ||
local yesno = require("Module:Yesno") | |||
-- check whether the input is a non-empty string | -- check whether the input is a non-empty string | ||
| Line 11: | Line 12: | ||
function p.infobox_interval(frame) | function p.infobox_interval(frame) | ||
local debug_mode = frame.args["debug"] | local debug_mode = yesno(frame.args["debug"]) | ||
local page_name = frame:preprocess("{{PAGENAME}}") | local page_name = frame:preprocess("{{PAGENAME}}") | ||
| Line 357: | Line 358: | ||
query = mw.uri.encode(query) | query = mw.uri.encode(query) | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
"<span style=\"font-size: 75%;\"> | "<span style=\"font-size: 75%;\">{{!(}}https://www.yacavone.net/xen-calc/?q=" .. query .. " Open this interval in ''xen-calc''{{)!}}</span>", | ||
}) | }) | ||
end | end | ||
local s = infobox.build("<u>Interval information</u>", infobox_data) | local s = infobox.build("<u>Interval information</u>", infobox_data) | ||
return frame:preprocess(debug_mode == true and "<pre>" .. s .. "</pre>" or s .. cats) | |||
end | end | ||
return p | return p | ||