wikiassets: Add repo

Summary:
Just use jsdelivr

Bug: Fixes T130
Signed-off-by: Yongmin Hong <revi@omglol.email>

Test Plan: Test after merge

Reviewers: #acl_sudoers, #blessed_reviewers, revi

Reviewed By: #acl_sudoers, #blessed_reviewers, revi

Maniphest Tasks: T130

Differential Revision: https://issuetracker.revi.xyz/D19
This commit is contained in:
revi 2024-05-04 17:34:31 +09:00
parent d45c16bde1
commit 1df5ac5ff6
Signed by: revi
GPG key ID: 1EB4F6CEEA100E94
3 changed files with 105 additions and 1 deletions

View file

@ -21,7 +21,7 @@ indent_style = space
# Tabs may not be valid YAML # Tabs may not be valid YAML
# @see https://yaml.org/spec/1.2/spec.html#id2777534 # @see https://yaml.org/spec/1.2/spec.html#id2777534
[*.{json,yml,yaml}] [*.{css,js,json,yml,yaml}]
indent_size = 2 indent_size = 2
indent_style = space indent_style = space

54
wikiassets/global.css Normal file
View file

@ -0,0 +1,54 @@
/** No betafeatures button */
#pt-betafeatures { display: none; }
/** no ULS button */
#pt-uls { display: none; }
/* I won't logout unless in preferences which is typed manually */
#pt-logout { display: none; }
#pt-preferences { display: none; }
/** Set custom color for redirect page */
.mw-redirect { color: #FAAFBE;}.mw-redirect:visited { color: #FAAFBE;}.mw-redirect:hover { color: #FAAFBE;}.mw-redirect:active { color: #FAAFBE;}
/** No MediaViewer button on File: namespace pages */
.mw-mmv-filepage-buttons { display: none }
/* Make protected pages' edit box shown in light pink. (http://www.color-hex.com/color/ffb6c1)
*/
.mw-textarea-protected, .ns-8 textarea {
background: #FFB6C1;
}
/* Make semi-protected pages' edit box shown in yellow. */
.mw-textarea-sprotected {
background: #FFFFDB;
}
/* Edit summaries
(Smaller font size instead of italicize) */
.comment {
font-style: normal !important;
font-size: 9pt;
}
/* Quick hack to force the Search tab on [[Special:Contribs]] open.
Credit: Volker E. (WMF) & Stwalkerster
[[Special:Permalink/19431311#Reverting the new "collapsed search interface" on Special:Contribs|Tech]] */
.mw-special-Contributions .oo-ui-fieldsetLayout-group.mw-collapsible-content { display: block !important; }
.mw-special-Contributions .oo-ui-fieldsetLayout-header { display: none !important; }
/* Colorize diff size
(Green for + and red for -) */
.mw-plusminus-pos {
color:green;
}
.mw-plusminus-neg {
color:red;
}
/* Get rid of 'partial' block. Uselessness 100% guaranteed.
TODO: Fix this (MW update broke this) */
.mw-block-restriction {display: none;} /* Kills partial block target list */
.mw-block-editing-restriction {display: none;} /* Kill Partial switch */
.mw-block-page-restrictions { display: none; } /* Kill radio box */

50
wikiassets/global.js Normal file
View file

@ -0,0 +1,50 @@
// enwiki purgetab
mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-purgetab.js&oldid=951989513&action=raw&ctype=text/javascript');
/* Automate purge confirmation dialog */
if ( mw.config.get( 'wgAction' ) === 'purge' ) {
$('form.mw-htmlform').submit();
}
/**
* StewardScript extends the user interface for Wikimedia stewards' convenience.
* @see https://meta.wikimedia.org/wiki/StewardScript
* @update-token [[File:pathoschild/stewardscript.js]]
*/
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.stewardscript.js');
// Display users rights (Temporary, might work on my own rewrite of this or find another one)
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Splarka/sysopdectector.js&oldid=653248315&action=raw&ctype=text/javascript');
// No MediaViewer
mw.config.set("wgMediaViewerOnClick", false);
/**
* Ajax sysop
* @see https://meta.wikimedia.org/wiki/Ajax_sysop
* @update-token [[File:pathoschild/ajaxsysop.js]]
*/
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxsysop.js');
/**
* Forces left-to-right layout and editing on RTL wikis.
* @see https://meta.wikimedia.org/wiki/Force_ltr
* @update-token [[File:pathoschild/forceltr.js]]
*/
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.forceltr.js');
// Change language to English if it is not
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:-revi/lang-to-en.js&action=raw&ctype=text/javascript');
// IRTC1015's permalink-collector
mw.loader.load('//ko.wikipedia.org/w/index.php?title=User:IRTC1015/copyReasonLink.js&oldid=20823911&action=raw&ctype=text/javascript');
// Display lists aka StewardLinks
mw.loader.load('//meta.wikimedia.org/w/index.php?oldid=20169009&action=raw&ctype=text/javascript');
/**
* TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
* @see https://meta.wikimedia.org/wiki/TemplateScript
* @update-token [[File:Pathoschild/templatescript.js]]
*/
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js');