Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #170 from BaigeiGu/master
Browse files Browse the repository at this point in the history
feat: 头像显示
  • Loading branch information
ZoruaFox authored Jan 30, 2024
2 parents fa70240 + b39e696 commit d67f444
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Gadgets/Compatibility/SiteCommonJS/SiteCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,16 @@ $(function deprecatedFunctions() {
*/
});
/* </nowiki> */

/*右上角显示头像*/
$(function () {
var loadingImage = "https://youshou.wiki/load.php?modules=skins.citizen.icons.wmui&image=userAvatar&format=original&skin=citizen&version=1qhza";
var headeruser = mw.user.getName();
var src = "https://youshou.wiki/extensions/Avatar/avatar.php?user=".concat(headeruser);
$('.mw-ui-icon-wikimedia-userAvatar').css({
'width':"75%",
'height':"75%",
'background-image':"url(" + src + ")"
'background-size': "cover"
});
});
14 changes: 14 additions & 0 deletions src/others/Citizen.css
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,18 @@ header.mw-body-header{
}
}

/* 右上角头像 */
.mw-ui-icon-wikimedia-userAvatar:before {
background-image: none;
}

.client-darkmode .mw-ui-icon-wikimedia-userAvatar {
-webkit-filter:invert(1) hue-rotate(180deg);
filter: invert(1) hue-rotate(180deg);
}

.mw-ui-icon-wikimedia-userAvatar {
border-radius: 5px;
}

/* </nowiki> */

0 comments on commit d67f444

Please sign in to comment.