User contributions for Couchor

Search for contributionsExpandCollapse
⧼contribs-top⧽
⧼contribs-date⧽
(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)

19 August 2022

  • 22:2722:27, 19 August 2022 diff hist +581 N Module:Category handler/blacklistCreated page with "return { '^Main Page$', -- don't categorise the main page. -- Don't categorise the following pages or their subpages. -- "%f[/\0]" matches if the next character is "/" or the end of the string. '^Liquipedia:Cascade%-protected items%f[/\0]', '^User:UBX%f[/\0]', -- The userbox "template" space. '^User talk:UBX%f[/\0]', -- Don't categorise subpages of these pages, but allow -- categorisation of the base page. '^Wikipedia:Template messages/.*$', -- Don't categor..." current
  • 22:2622:26, 19 August 2022 diff hist +6,736 N Module:Category handlerCreated page with "-- Load required modules local yesno = require('Module:Yesno') -- Lazily load things we don't always need local mShared, mappings local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function trimWhitespace(s, removeBlanks) if type(s) ~= 'string' then return s end s = s:match('^%s*(.-)%s*$') if removeBlanks then i..." current
  • 22:0722:07, 19 August 2022 diff hist −27 Module:Squad/RowNo edit summary Tag: Manual revert
  • 22:0322:03, 19 August 2022 diff hist +12 Module:Squad/RowNo edit summary Tag: Reverted
  • 21:4821:48, 19 August 2022 diff hist +15 Module:Squad/RowNo edit summary Tag: Reverted
  • 21:4821:48, 19 August 2022 diff hist −14 Module:Squad/CustomNo edit summary current Tag: Manual revert
  • 21:4621:46, 19 August 2022 diff hist +14 Module:Squad/CustomNo edit summary Tag: Reverted
  • 21:4121:41, 19 August 2022 diff hist −18 Module:Squad/RowNo edit summary
  • 21:3121:31, 19 August 2022 diff hist +6 Module:Squad/RowNo edit summary
  • 21:2921:29, 19 August 2022 diff hist +13 Module:Squad/RowNo edit summary
  • 21:2721:27, 19 August 2022 diff hist +1,444 N Module:VariablesCreated page with "local Class = require('Module:Class') local Variables = {} ---Stores a wiki-variable and returns the empty string ---@param name string Key of the wiki-variable ---@param value string Value of the wiki-variable ---@return string #always the empty string function Variables.varDefine(name, value) return mw.ext.VariablesLua.vardefine(name, value) end ---Stores a wiki-variable and returns the stored value ---@param name string Key of the wiki-variable ---@param value str..." current
  • 21:2721:27, 19 August 2022 diff hist +2,409 N Module:LocalisationCreated page with "local Class = require('Module:Class') local Localisation = {} local String = require('Module:StringUtils') local Logic = require('Module:Logic') function Localisation.getCountryName(country, noentry) local data = mw.loadData('Module:Localisation/data/country') -- clean the entered country value country = Localisation._cleanCountry(country) -- First try to look it up local countryname = data[country] -- Return message if none is found if countryname == nil then..." current
  • 21:2621:26, 19 August 2022 diff hist +4,603 N Module:PlayerCreated page with "local getFlag = require('Module:Localisation').getCountryName local p = {} function p._cleanInput(name) local arrayLink local arrayName if (name or '') ~= '' then name = name:gsub("%b{}", "") name = name:gsub("%b<>", "") name = name:gsub("%b[]", "") name = mw.text.trim(name) arrayLink, arrayName = p._split(name) end return arrayLink, arrayName end function p._split(name) local link = '' if (name or '') ~= '' then local nameArray =..." current
  • 21:2621:26, 19 August 2022 diff hist +1,355 N Module:FnUtilCreated page with "local FnUtil = {} -- Creates a memoized copy of a 0 or 1 param function. function FnUtil.memoize(f) local called = {} local results = {} local nilCalled = false local nilResult return function(x) if x == nil then if not nilCalled then nilCalled = true nilResult = f(x) end return nilResult else if not called[x] then called[x] = true results[x] = f(x) end return results[x] end end end --[[ Memoized variant of the Y combinator..." current
  • 21:2521:25, 19 August 2022 diff hist +10,367 N Module:TableCreated page with "local Table = {} function Table.randomize(tbl) math.randomseed(os.time()) for i = #tbl, 2, -1 do local j = math.random(i) tbl[i], tbl[j] = tbl[j], tbl[i] end return tbl end function Table.size(tbl) local i = 0 for _ in pairs(tbl) do i = i + 1 end return i end function Table.includes(tbl, value) for _, entry in ipairs(tbl) do if entry == value then return true end end return false end function Table.filter(tbl, predicate, argument) local filt..." current
  • 21:2521:25, 19 August 2022 diff hist +1,763 N Module:LogicCreated page with "local Logic = {} function Logic.emptyOr(val1, val2, default) if not Logic.isEmpty(val1) then return val1 elseif not Logic.isEmpty(val2) then return val2 else return default end end function Logic.nilOr(...) local args = require('Module:Table').pack(...) for i = 1, args.n do local arg = args[i] local val if type(arg) == 'function' then val = arg() else val = arg end if val ~= nil then return val end end return nil end function Logic..." current
  • 21:2421:24, 19 August 2022 diff hist +2,078 N Module:TemplateCreated page with "local Arguments = require('Module:Arguments') local Json = require('Module:Json') local PageVariableNamespace = require('Module:PageVariableNamespace') local Template = {} function Template.safeExpand(frame, title, args, defaultTemplate) local result, value = pcall(frame.expandTemplate, frame, {title = title, args = args}) if result then return value else local templateName = 'Template:' .. (title or '') .. '' return defaultTemplate or templateName end en..." current
  • 21:2321:23, 19 August 2022 diff hist +38,247 N Module:Flags/MasterDataCreated page with "-- There are four tables: -- data (contains flag images. Should have one entry per image) -- twoLetter (two-letter country codes as per ISO 3166-1 alpha-2) -- threeLetter (three-letter country codes) -- aliases (redirects to the appropriate index in the data table) -- This table includes: -- ISO 3166-1 alpha-2 -- ISO 3166-1 alpha-2 User-assigned Code Elements -- ISO 3166-1 alpha-2 Exceptional Reservations -- ISO 3166-1 alpha-2 Traditional Reservations --..."
  • 21:2221:22, 19 August 2022 diff hist +778 N Module:ReferenceCleanerCreated page with "local Class = require('Module:Class') local ReferenceCleaner = {} function ReferenceCleaner.clean(dateWithRef) if dateWithRef == nil then return '' end -- due to '-' and '?' being part of the 'magic' characters for patterns -- we have to escape them with '%' dateWithRef = dateWithRef:gsub('%-%?%?', '-01') dateWithRef = dateWithRef:gsub('%-XX', '-01') local correctDate = string.match(dateWithRef, '(%d+-%d+-%d+)') if correctDate then return correctDate end..." current
  • 21:2021:20, 19 August 2022 diff hist +4 Template:SquadNo edit summary Tags: Manual revert Reverted
(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)