Module:Banned

local p = {}

local banned = require("Module:Banned/data")

function p.list local items = {} local ret = mw.html.create('table') ret :addClass('wikitable sortable') :tag('tr') :tag('th'):wikitext('Username'):done :tag('th'):wikitext('Reason'):done :done

for index, data in ipairs(banned) do   ret:node( generateRow(data.username, data.reason, data.link) ) end return ret end

function generateRow(username, reason, link) local ret = mw.html.create('tr') if link == nil then ret:tag('td'):wikitext ( username ):done else ret:tag('td'):wikitext ( "" .. username .. "" ):done end if string.find(reason, "Unknown") then ret :tag('td'):wikitext( reason ) :css({           background = 'rgba(127,127,127,0.3)';            color = '#999';            cursor = 'default';            ['user-select'] = 'none';          }) :done else ret:tag('td'):wikitext( reason ):done end return ret end

function p.amount local amount = 0 for index, data in ipairs(banned) do 	amount = amount + 1 end return amount end

return p