微件:SaltUserScoreLevel:修订间差异

添加1,663字节 、​ 2023年3月17日 (星期五)
// Edit via Wikiplus
无编辑摘要
(// Edit via Wikiplus)
 
(未显示2个用户的4个中间版本)
<noinclude>已弃用,请使用 <code>edit-credit</code>标签代替。
<noinclude>Salt_lovely的等级:{{用户编辑积分等级|Salt_lovely}}
 
Sheep-realmSalt_lovely的等级:{{用户编辑积分等级|Sheep-realmsSalt_lovely}}</noinclude><includeonly><script defer>
 
Sheep-realms的等级:{{用户编辑积分等级|Sheep-realms}}</noinclude><includeonly><script>
(function () {
if (typeof window['$saltUserContributionLevel'] == 'undefined') {
window['$saltUserContributionLevel'] = true
} else {
return
}
let elems = document.querySelectorAll('.salt-user-contribution-level')
if (elems.length < 1) { return }
el.classList.add('lv00')
}
el.classList.remove('salt-user-contribution-level')
el.classList.add('salt-user-contribution-level-done')
el.classList.add('user-score-level')
}
addStyle(`
.user-score-level:before {
content: "Lv.";
margin-left: -5px;
margin-right: 4px;
padding: 1px 3px 1px 5px;
background: #999;
border-radius: 5px 0 0 5px;
}
.user-score-level {
color: #FFF;
background: #777;
padding: 1px 5px 1px 5px;
border-radius: 5px;
font-weight: bold;
font-size: 14px;
text-shadow: #777 0 0 2px;
margin: auto 3px;
}
.lv00:before {background: #EEE;}
.lv00 {background: #E7E7E7;color: #BBB;text-shadow: none;}
.lv01:before {background: #CCC;}
.lv01 {background: #AAA;}
.lv01-5:before {background: #73CC65;}
.lv01-5 {background: #449937;}
.lv02:before {background: #6FC2F2;}
.lv02 {background: #4E9ECC;}
.lv03:before {background: #D9C75E;}
.lv03 {background: #BFAD48;}
.lv04:before {background: #D99447;}
.lv04 {background: #BF7D32;}
.lv05:before {background: #E67252;}
.lv05 {background: #BF5132;}
.lv06:before {background: #E64545;}
.lv06 {background: #BF2727;}
.lv07:before {background: #F24395;}
.lv07 {background: #CC2673;}
.lv08:before {background: #CD30D9;}
.lv08 {background: #A813B2;}
.lv09:before {background: #9530D9;}
.lv09 {background: #7313B2;}
.lv10:before {background: #555;}
.lv10 {background: #000;}
`, 'salt-user-contribution-level')
 
function str2int(str) {
}
}
 
function scoreCount(str = '') {
let l = str.split('SPLIT'), ec = []
//console.log(ec[0] * 3 + ec[1] * 2.5 + ec[2] * 2 + ec[3] + ec[4] + ec[5] / 4 + (ec[6] + ec[7] + ec[8]) / 8)
return Math.floor(ec[0] * 3 + ec[1] * 2.5 + ec[2] * 2 + ec[3] + ec[4] + ec[5] / 4 + (ec[6] + ec[7] + ec[8]) / 8)
}
 
function addStyle(styleCode = '', styleID = '') {
let s = document.createElement('style')
if (styleID.length > 0) {
if (document.querySelector('style[' + styleID + ']')) {
return
} else {
s.setAttribute(styleID, '')
}
}
s.textContent = styleCode
document.head.appendChild(s)
}
})();
维护员、​界面管理员、​巡查员、​监督员、​小部件编辑者
3,462

个编辑