Module:Contentious topics/talk notice/sandbox: Difference between revisions

Content deleted Content added
save a WIP
test
(One intermediate revision by the same user not shown)
Line 175:
-- Add the protection level
if yesno(args.protection, true) or yesno(args.aeprotection, true) then
local protectionLevel = (currentTitleObject.subjectPageTitle.protectionLevels["edit"] or {nil})[1] -- the or {nil} allows a graceful fail if the subjectPage does not (yet) exist
if protectionLevel then
-- we have a |protection=foo parameter, and the page is protected
Line 433:
messageBox = messageBoxModule.main("tmbox", {
["type"] = underRestrictions and "delete" or "content",
["small"] = yesno(args.small),
["image"] = "[[File:Commons-emblem-"
.. (underRestrictions and "hand" or "issue")
.. ".svg|40px]]",
.. (yesno(args.small) and "30" or "40")
.. "px]]",
["text"] = messageBody
})
Line 454 ⟶ 451:
["class"] = "nonextendedconfirmed-show ECR-edit-request-warning",
["style"] = "background: var(--background-color-destructive-subtle, #ffe9e5); border-color: var(--border-color-destructive, #f54739); color: var(--color-base, #202122);",
["image"] = "[[File:Commons-emblem-hand.svg|" .. (yesno(args.small) and "30" or "40") .. "px40px]]"
}).. messageBox
end
Line 487 ⟶ 484:
addKnownParameter('relatedcontent')
addKnownParameter('section')
 
addKnownParameter('small')
-- then add all of the partialTopics section parameters
for code, _ in pairs(partialTopics) do