Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Template:Infobox Wikipedia user script/testcases

From Wikipedia, the free encyclopedia

Default

[edit]
{{Infobox Wikipedia user script
 | name = MyScript
 | desc = Does something useful
 | author = [[User:Username|Username]]
 | updated = {{start date and age|2013|03|03}}
 | status = Stable
 | released = {{start date and age|2008|07|07}}
 | version = 2.1.0
 | source = [[User:Username/Example.js]]
 | skins = Vector
 | browsers = [[Firefox]], [[Google Chrome|Chrome]]
 | logo = [[File:Wikimedia-logo.svg|50px]]
 | screenshot = [[File:Floater script screenshot.png|300px]]
 | screenshot-caption = MyScript in action
}}
Default style
{{Infobox Wikipedia user script}}{{Infobox Wikipedia user script/sandbox}}
MyScript
MyScript in action
DescriptionDoes something useful
AuthorUsername
Status
Release
First releasedJuly 7, 2008; 18 years ago (2008-07-07)
Version2.1.0
UpdatedMarch 3, 2013; 13 years ago (2013-03-03)
BrowsersFirefox, Chrome
SkinsVector
SourceUser:Username/Example.js
MyScript
MyScript in action
DescriptionDoes something useful
AuthorUsername
StatusStable
First releasedJuly 7, 2008; 18 years ago (2008-07-07)
Version2.1.0
UpdatedMarch 3, 2013; 13 years ago (2013-03-03)
BrowsersFirefox, Chrome
SkinsVector
SourceUser:Username/Example.js

Styled

[edit]
{{Infobox Wikipedia user script
 | styled=true
 | name = MyScript
 | desc = Does something useful
 | author = [[User:Username|Username]]
 | updated = {{start date and age|2013|03|03}}
 | status = Stable
 | released = {{start date and age|2008|07|07}}
 | version = 2.1.0
 | source = [[User:Username/Example.js]]
 | skins = Vector
 | browsers = [[Firefox]], [[Google Chrome|Chrome]]
 | logo = [[File:Wikimedia-logo.svg|50px]]
 | screenshot = [[File:Floater script screenshot.png|300px]]
 | screenshot-caption = MyScript in action
}}
|styled=true
{{Infobox Wikipedia user script}}{{Infobox Wikipedia user script/sandbox}}
User script
MyScript
MyScript in action
DescriptionDoes something useful
AuthorUsername
Status
Release
First releasedJuly 7, 2008; 18 years ago (2008-07-07)
Version2.1.0
UpdatedMarch 3, 2013; 13 years ago (2013-03-03)
BrowsersFirefox, Chrome
SkinsVector
SourceUser:Username/Example.js
User script
MyScript
MyScript in action
DescriptionDoes something useful
AuthorUsername
StatusStable
First releasedJuly 7, 2008; 18 years ago (2008-07-07)
Version2.1.0
UpdatedMarch 3, 2013; 13 years ago (2013-03-03)
BrowsersFirefox, Chrome
SkinsVector
SourceUser:Username/Example.js
{{Infobox Wikipedia user script
 | styled=yes
 | name = MyScript
 | desc = Does something useful
 | author = [[User:Username|Username]]
 | updated = {{start date and age|2013|03|03}}
 | status = Stable
 | released = {{start date and age|2008|07|07}}
 | version = 2.1.0
 | source = [[User:Username/Example.js]]
 | skins = Vector
 | browsers = [[Firefox]], [[Google Chrome|Chrome]]
 | logo = [[File:Wikimedia-logo.svg|50px]]
 | screenshot = [[File:Floater script screenshot.png|300px]]
 | screenshot-caption = MyScript in action
}}
|styled=yes
{{Infobox Wikipedia user script}}{{Infobox Wikipedia user script/sandbox}}
User script
MyScript
MyScript in action
DescriptionDoes something useful
AuthorUsername
Status
Release
First releasedJuly 7, 2008; 18 years ago (2008-07-07)
Version2.1.0
UpdatedMarch 3, 2013; 13 years ago (2013-03-03)
BrowsersFirefox, Chrome
SkinsVector
SourceUser:Username/Example.js
User script
MyScript
MyScript in action
DescriptionDoes something useful
AuthorUsername
StatusStable
First releasedJuly 7, 2008; 18 years ago (2008-07-07)
Version2.1.0
UpdatedMarch 3, 2013; 13 years ago (2013-03-03)
BrowsersFirefox, Chrome
SkinsVector
SourceUser:Username/Example.js
[edit]
{{Infobox Wikipedia user script
 | name = GitHub Test
 | desc = Testing legacy github param
 | github = ExampleUser/ExampleRepo
}}
Scenario 1: GitHub Parameter
Should display "GitHub repository" label with "username/repo" text.
{{Infobox Wikipedia user script}}{{Infobox Wikipedia user script/sandbox}}
GitHub Test
DescriptionTesting legacy github param
UpdatedJanuary 2, 2026
    (7 months ago)
SourceTemplate:Infobox Wikipedia user script/testcases
GitHub repositoryExampleRepo
GitHub Test
DescriptionTesting legacy github param
UpdatedJanuary 2, 2026
    (7 months ago)
SourceTemplate:Infobox Wikipedia user script/testcases
GitHub repositoryExampleRepo
{{Infobox Wikipedia user script
 | name = Codeberg Test
 | desc = Testing auto-domain extraction
 | repository = https://www.codeberg.org/ExampleUser/ExampleRepo
}}
Scenario 2: Generic Repo (Auto-label)
Should extract domain (e.g., "codeberg.org") and strip "www".
{{Infobox Wikipedia user script}}{{Infobox Wikipedia user script/sandbox}}
Codeberg Test
DescriptionTesting auto-domain extraction
UpdatedJanuary 2, 2026
    (7 months ago)
SourceTemplate:Infobox Wikipedia user script/testcases
Repositorycodeberg.org
Codeberg Test
DescriptionTesting auto-domain extraction
UpdatedJanuary 2, 2026
    (7 months ago)
SourceTemplate:Infobox Wikipedia user script/testcases
Repositorycodeberg.org
{{Infobox Wikipedia user script
 | name = Override Test
 | desc = Testing manual label override
 | repository = https://gitlab.com/ExampleUser/ExampleRepo
 | repository-name = Custom Gitlab Link
}}
Scenario 3: Generic Repo (Manual Label)
Should display "Custom Label" instead of the domain.
{{Infobox Wikipedia user script}}{{Infobox Wikipedia user script/sandbox}}
Override Test
DescriptionTesting manual label override
UpdatedJanuary 2, 2026
    (7 months ago)
SourceTemplate:Infobox Wikipedia user script/testcases
RepositoryCustom Gitlab Link
Override Test
DescriptionTesting manual label override
UpdatedJanuary 2, 2026
    (7 months ago)
SourceTemplate:Infobox Wikipedia user script/testcases
RepositoryCustom Gitlab Link