[爆卦]surviv io武器是什麼?優點缺點精華區懶人包

為什麼這篇surviv io武器鄉民發文收入到精華區:因為在surviv io武器這個討論話題中,有許多相關的文章在討論,這篇最有參考價值!作者Allenbootung (不痛)看板Little-Games標題Re: [分享] 射擊 - s...


老是忘記自己拿的槍是什麼顏色的,把這段程式碼貼到console能把武器欄上色。
https://imgur.com/ifVOmQQ

// ==UserScript==
// @name surviv gun color
// @namespace http://tampermonkey.net/
// @version 0.3
// @description try to take over the world!
// @author Allenbootung
// @match http://surviv.io/*
// @grant none
// ==/UserScript==

(function() {
'use strict';

var elems = document.getElementsByClassName('ui-weapon-name');
console.log(elems);

for (var ii=0; ii<elems.length; ii++) {

elems[ii].addEventListener('DOMSubtreeModified', function(){
var weaponName = this.textContent;

var border = 'ridge ';//auto fire

//not autofire mode
switch(weaponName) {

//fast rate
case 'Fists':
case 'Frag':
case 'Smoke':

case 'M9'://trash
case 'MP220'://OP
case 'OT-38':
case 'Desert Eagle':

case 'M39 EMR':
case 'Mk 12 SPR':
border = 'double ';
break;

//slow rate
case 'UMP9'://trash
case 'M870':
case 'Mosin-Nagant':
case 'SV-98':
case 'FAMAS':
border = 'dashed ';
break;

}


//weapon color
switch(weaponName) {

//orange bullet 9mm
case 'M9':
case 'UMP9':
case 'MP5':
case 'Glock 18C':
case 'MAC-10':
case 'Vector':
border += 'orange';
break;

//red bullet 12gauge
case 'M870':
case 'MP220':
case 'Saiga-12':
border += 'red';
break;

//blue bullet 7.62mm
case 'OT-38':
case 'M39 EMR':
case 'Mosin-Nagant':
case 'SV-98'://ddddd
case 'AK-47':
case 'DP-28':
case 'SCAR-H':
border += 'blue';
break;

//green bullet 5.56mm
case 'FAMAS':
case 'Mk 12 SPR':
case 'HK416':
case 'M249':
border += 'green';
break;

//black bullet 50ae
case 'Desert Eagle':
border += 'black';
break;

case 'Smoke':
border += 'white';
break;

case 'Frag':
border += 'red';
break;

default:
border = '';
break;
}
console.log(border);

this.parentNode.style.border=border;
}, false);
}
})();

--
jQuery做事,開口不談$後面啥都別想動。

--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.41.145.102
※ 文章網址: https://www.ptt.cc/bbs/Little-Games/M.1528643297.A.52B.html

你可能也想看看

搜尋相關網站