https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3ASelf%2Fsandbox
Module:Self/sandbox - Revision history
2025-06-07T04:58:34Z
Revision history for this page on the wiki
MediaWiki 1.45.0-wmf.4
https://en.wikipedia.org/w/index.php?title=Module:Self/sandbox&diff=1244690191&oldid=prev
Matrix at 15:57, 8 September 2024
2024-09-08T15:57:49Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 15:57, 8 September 2024</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 73:</td>
<td colspan="2" class="diff-lineno">Line 73:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local args = frame:getParent().args</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local args = frame:getParent().args</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local tstyles = frame:extensionTag( 'templatestyles', '', { src = 'Module:Self/styles.css' } )</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local tstyles = frame:extensionTag( 'templatestyles', '', { src = 'Module:Self/styles.css' } )</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local fmt_string_tmpl = '<div class="wp-tmpl-self-license-wrapper<del style="font-weight: bold; text-decoration: none;"> notheme</del>">' ..</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local fmt_string_tmpl = '<div class="wp-tmpl-self-license-wrapper">' ..</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> '<div class="center">%s</div><div class="center">%s</div>%s</div>%s'</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> '<div class="center">%s</div><div class="center">%s</div>%s</div>%s'</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local initial_text = p.start_line(args)</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local initial_text = p.start_line(args)</div></td>
</tr>
</table>
Matrix
https://en.wikipedia.org/w/index.php?title=Module:Self/sandbox&diff=1236315978&oldid=prev
Jonesey95: try notheme for dark mode
2024-07-24T01:39:16Z
<p>try notheme for dark mode</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 01:39, 24 July 2024</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 73:</td>
<td colspan="2" class="diff-lineno">Line 73:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local args = frame:getParent().args</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local args = frame:getParent().args</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local tstyles = frame:extensionTag( 'templatestyles', '', { src = 'Module:Self/styles.css' } )</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local tstyles = frame:extensionTag( 'templatestyles', '', { src = 'Module:Self/styles.css' } )</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local fmt_string_tmpl = '<div class="wp-tmpl-self-license-wrapper">' ..</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local fmt_string_tmpl = '<div class="wp-tmpl-self-license-wrapper<ins style="font-weight: bold; text-decoration: none;"> notheme</ins>">' ..</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> '<div class="center">%s</div><div class="center">%s</div>%s</div>%s'</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> '<div class="center">%s</div><div class="center">%s</div>%s</div>%s'</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local initial_text = p.start_line(args)</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local initial_text = p.start_line(args)</div></td>
</tr>
</table>
Jonesey95
https://en.wikipedia.org/w/index.php?title=Module:Self/sandbox&diff=1236315861&oldid=prev
Jonesey95: sync with live module
2024-07-24T01:38:20Z
<p>sync with live module</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 01:38, 24 July 2024</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 49:</td>
<td colspan="2" class="diff-lineno">Line 49:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local more_than_one = p.more_than_one(args)</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local more_than_one = p.more_than_one(args)</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return mw.ustring.format(</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return mw.ustring.format(</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> '\'\'\'\'\'%s, the copyright holder of this work,\'\'\' hereby publish%s<del style="font-weight: bold; text-decoration: none;">,</del> it under the following license%s:\'\'',</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> '\'\'\'\'\'%s, the copyright holder of this work,\'\'\' hereby publish%s it under the following license%s:\'\'',</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> args['author'] or 'I',</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> args['author'] or 'I',</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> args['author'] and 'es' or '',</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> args['author'] and 'es' or '',</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 86:</td>
<td colspan="2" class="diff-lineno">Line 86:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> errors = errors .. tmpl_with_args.errors</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> errors = errors .. tmpl_with_args.errors</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> return<del style="font-weight: bold; text-decoration: none;"> '<br>' ..</del> tstyles .. mw.ustring.format(fmt_string_tmpl, initial_text, templates, final_line, categories) .. errors</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> return tstyles .. mw.ustring.format(fmt_string_tmpl, initial_text, templates, final_line, categories) .. errors</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
</table>
Jonesey95
https://en.wikipedia.org/w/index.php?title=Module:Self/sandbox&diff=1191094949&oldid=prev
Sohom Datta: Create sandbox version of Module:Self add a newline ?
2023-12-21T14:57:10Z
<p>Create sandbox version of <a href="/wiki/Module:Self" title="Module:Self">Module:Self</a> add a newline ?</p>
<p><b>New page</b></p><div>local p = {}<br />
<br />
function p.decide_migration(args)<br />
if args['migration'] then<br />
return args['migration']<br />
end<br />
local licsense_migration_data = mw.loadJsonData( 'Module:Self/license_migration_data.json')<br />
for _, template_name in ipairs(args) do<br />
local migration_data = licsense_migration_data[string.lower(template_name)]<br />
if migration_data == 'redundant' then<br />
return migration_data<br />
end<br />
end<br />
return ''<br />
end<br />
<br />
function p.setup_template_params(template_name, frame, args, migration)<br />
local title = mw.title.new(template_name, 10)<br />
if not title.exists then<br />
return {<br />
txt='',<br />
errors=('<span class="error scribunto-error">The license "' .. template_name .. '" does not exist.</span>' ..<br />
'[[Category:Wikipedia dual licensed files with invalid licenses]]'<br />
)<br />
}<br />
end<br />
<br />
return { txt=(frame:expandTemplate({<br />
title = template_name,<br />
args = {<br />
dw= (args['dw'] or 'no'),<br />
date= (args['date'] or ''),<br />
migration= (migration)<br />
} })), errors='' }<br />
end<br />
<br />
function p.more_than_one(args)<br />
local c = 0<br />
for _, __ in ipairs(args) do<br />
c = c + 1<br />
if c == 2 then<br />
return true<br />
end<br />
end<br />
return false<br />
end<br />
<br />
function p.start_line(args)<br />
local more_than_one = p.more_than_one(args)<br />
return mw.ustring.format(<br />
'\'\'\'\'\'%s, the copyright holder of this work,\'\'\' hereby publish%s, it under the following license%s:\'\'',<br />
args['author'] or 'I',<br />
args['author'] and 'es' or '',<br />
more_than_one and 's' or ''<br />
)<br />
end<br />
<br />
function p.categories(args)<br />
local currentTitle = mw.title.getCurrentTitle()<br />
local is_in_file_namespace = currentTitle.nsText == 'File'<br />
if not is_in_file_namespace then<br />
return ''<br />
end<br />
<br />
if args['author'] then<br />
return mw.ustring.format('[[Category:Files licensed by third parties|%s]]', currentTitle.fullText)<br />
else<br />
return mw.ustring.format('[[Category:Self-published work|%s]]', currentTitle.fullText)<br />
end<br />
end<br />
<br />
function p.main(frame)<br />
local args = frame:getParent().args<br />
local tstyles = frame:extensionTag( 'templatestyles', '', { src = 'Module:Self/styles.css' } )<br />
local fmt_string_tmpl = '<div class="wp-tmpl-self-license-wrapper">' ..<br />
'<div class="center">%s</div><div class="center">%s</div>%s</div>%s'<br />
local initial_text = p.start_line(args)<br />
local final_line = p.more_than_one(args) and "<div class='center'>''You may select the license of your choice.''</div>" or ''<br />
local categories = p.categories(args)<br />
local templates = ''<br />
local errors = ''<br />
local migration = p.decide_migration(args)<br />
for _, template_name in ipairs(args) do<br />
tmpl_with_args = p.setup_template_params(template_name, frame, args, migration)<br />
templates = templates .. tmpl_with_args.txt<br />
errors = errors .. tmpl_with_args.errors<br />
end<br />
return '<br>' .. tstyles .. mw.ustring.format(fmt_string_tmpl, initial_text, templates, final_line, categories) .. errors<br />
end<br />
<br />
return p<br />
-- </nowiki></div>
Sohom Datta