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

Content deleted Content added
save a WIP
save a WIP
Line 4:
local yesno = require('Module:Yesno')
local checkForUnknownParameters = require('Module:Check for unknown parameters')._check
local messageBoxModule = require('Module:Message box')
local categoryDatabase = mw.loadJsonData("Template:Contentious topics/Category database.json")
local restrictionsDatabase = mw.loadJsonData("Template:Contentious topics/Additional restrictions.json")
Line 430 ⟶ 431:
-- Now build the messageBox
messageBox = require('Module:Message box')messageBoxModule.main("tmbox", {
["type"] = underRestrictions and "delete" or "content",
["small"] = yesno(args.small),
Line 443 ⟶ 444:
-- If ECR is enabled, prepend the ECR warning
if restrictionFlags["ECR"] then
messageBox = frame:expandTemplate{
title = "Template:Contentious topics/talk notice/ECR warning",
args = { section = section and "yes" or "", small = args.small}}
.. messageBox
-- Hard code for [[WP:BER]]
if TableTools.inArray(completeTopics, "a-i") then
Line 453 ⟶ 449:
addCategory("Wikipedia pages subject to the extended confirmed restriction related to the Arab-Israeli conflict")
end
-- Then build the ECR box
messageBox = messageBoxModule.main("tmbox", {
["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") .. "px]]"
}).. messageBox
end