User contributions for Sware

A user with 48,427 edits. Account created on 14 August 2019.
Jump to navigation Jump to search
Search for contributionsExpandCollapse
⧼contribs-top⧽
⧼contribs-date⧽
(newest | oldest) View (  | ) (20 | 50 | 100 | 250 | 500)

1 July 2025

30 June 2025

29 June 2025

28 June 2025

  • 09:2209:22, 28 June 2025 diff hist +429 Module:links/templates No edit summary
  • 09:1809:18, 28 June 2025 diff hist +2 Module:links No edit summary
  • 09:1609:16, 28 June 2025 diff hist +364 N Module:string/startswith Created page with "local sub = string.sub --[==[ Returns {true} if the string {str} starts with the string {val}, or {false} if not. The optional indices {i} and {j} can be used to check a substring of {str}. Note that {val} is a string literal, not a Lua pattern.]==] return function(str, val, i, j) return sub(i == nil and j == nil and str or sub(str, i, j), 1, #val) == val end"
  • 09:1509:15, 28 June 2025 diff hist +695 N Module:frame Created page with "local export = {} local frame local function get_frame() frame = mw.getCurrentFrame():newChild{} return frame end function export.callParserFunction(...) return (frame or get_frame()):callParserFunction(...) end function export.expandTemplate(...) return (frame or get_frame()):expandTemplate(...) end function export.extensionTag(...) return (frame or get_frame()):extensionTag(...) end function export.newParserValue(...) return (frame or get_frame()):newParserV..."
  • 09:1509:15, 28 June 2025 diff hist +1,322 N Module:fun/isCallable Created page with "local table_get_metamethod_module = "Module:table/getMetamethod" local require = require local type = type local function get_metamethod(...) get_metamethod = require(table_get_metamethod_module) return get_metamethod(...) end --[==[ Return {true} if the input is a function or functor (an object which can be called like a function, because it has a {__call} metamethod). Note: if the input is an object with a {__call} metamethod, but this function is not able to fin..." current
  • 09:1409:14, 28 June 2025 diff hist +1,771 N Module:table/getUnprotectedMetatable Created page with "local _getmetatable = debug.getmetatable -- For testing (and just in case it gets enabled). if _getmetatable ~= nil then -- Avoid debug.getmetatable() throwing an error if 0 arguments are passed, -- for parity with the other function. return function(t) return _getmetatable(t) end end _getmetatable = getmetatable local pcall = pcall local rawget = rawget local setmetatable = setmetatable local type = type --[==[ Attempts to retrieve the input value's metatable,..."
  • 09:1409:14, 28 June 2025 diff hist +1,552 N Module:table/getMetamethod Created page with "local table_get_unprotected_metatable = "Module:table/getUnprotectedMetatable" local rawget = rawget local select = select local function get_unprotected_metatable(...) get_unprotected_metatable = require(table_get_unprotected_metatable) return get_unprotected_metatable(...) end local function get_metamethod(n, i, mt, mm, ...) if mt then mm = rawget(mt, mm) else mm = nil end if i == n then return mm end return mm, get_metamethod(n, i + 1, mt, ...) end -..."
  • 09:1309:13, 28 June 2025 diff hist +1,362 N Module:title/isTitle Created page with "local table_get_metamethod_module = "Module:table/getMetamethod" local error = error local rawequal = rawequal local type = type local function get_metamethod(...) get_metamethod = require(table_get_metamethod_module) return get_metamethod(...) end local title_eq, title_lt local function get_title_mm() local success, eq, lt = get_metamethod(mw.title.getCurrentTitle(), "__eq", "__lt") if not success then error("Failed to fetch current title") -- this should never..."
  • 09:1309:13, 28 June 2025 diff hist +1,969 N Module:title/exists Created page with "local title_is_title_module = "Module:title/isTitle" local title_new_title_module = "Module:title/newTitle" local error = error local format = string.format local pcall = pcall local require = require local type = type local at_limit local function is_title(...) is_title = require(title_is_title_module) return is_title(...) end local function new_title(...) new_title = require(title_new_title_module) return new_title(...) end local function exists(title) return..." current
  • 09:1309:13, 28 June 2025 diff hist +645 N Module:title/getMainPageTitle Created page with "local title_new_title_module = "Module:title/newTitle" local require = require local function new_title(...) new_title = require(title_new_title_module) return new_title(...) end local main_page local function get_main_page() -- Ideally this would be done via some kind of :parse() method, but the -- mw.message library got heavily nerfed by phab:T62758, meaning it's -- now only able to fetch the unparsed wikitext and can't expand it. main_page, get_main_page..." current
  • 09:1209:12, 28 June 2025 diff hist +964 N Module:title/getCurrentTitle Created page with "local get_current_title = mw.title.getCurrentTitle --[==[ A modified version of {mw.title.getCurrentTitle}, which returns the title object for the current title. If the additional optional parameter {fragment} is given, the returned title object will have that value as the fragment, which is the part of the title that comes after {#}, referring to a specific section on the page (e.g. in {"foo#bar"}, the fragment is {"bar"}). This is a convenience function, which is gen..." current
  • 09:1209:12, 28 June 2025 diff hist +196 N Module:title/getCurrentNamespace Created page with "--[==[ Returns the data table for the current namespace from {mw.site.namespaces}. This module may be loaded with {mw.loadData}.]==] return mw.site.namespaces[mw.title.getCurrentTitle().namespace]"
  • 09:1109:11, 28 June 2025 diff hist +6,179 N Module:title/newTitle Created page with "local load_module = "Module:load" local scribunto_module = "Module:Scribunto" local title_get_current_namespace_module = "Module:title/getCurrentNamespace" local title_get_current_title_module = "Module:title/getCurrentTitle" local title_get_main_page_title_module = "Module:title/getMainPageTitle" local byte = string.byte local find = string.find local match = string.match local new_title = mw.title.new local reverse = string.reverse local sub = string.sub local type =..."
  • 09:0909:09, 28 June 2025 diff hist +3,129 Module:documentation No edit summary
  • 09:0509:05, 28 June 2025 diff hist −240 Module:number list/show No edit summary current

13 June 2025

8 June 2025

27 May 2025

(newest | oldest) View (  | ) (20 | 50 | 100 | 250 | 500)