Inventory and onlinelist now pre load on login and open without delay on keybind press.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
window.onbeforeunload = () => { window.scrollTo(0, 0); }
|
||||
$(document).ready(function () { mp.trigger('CEF:PlayerList_Loaded'); });
|
||||
|
||||
setPlayerCount = (factionId, value) => {
|
||||
if (factionId == -1) {
|
||||
@@ -9,6 +8,21 @@ setPlayerCount = (factionId, value) => {
|
||||
}
|
||||
}
|
||||
|
||||
function showPlayerList() {
|
||||
document.getElementsByName("OnlineList")[0].classList.remove("hidden");
|
||||
mp.events.call("CEF:PlayerList_Loaded");
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
function closePlayerList() {
|
||||
document.getElementsByName("OnlineList")[0].classList.toggle("hidden");
|
||||
}
|
||||
|
||||
function clear_row() {
|
||||
document.getElementById('players').innerHTML = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getFactionNameByFactionId(factionId) {
|
||||
switch (parseInt(factionId)) {
|
||||
case 1: return "LSPD";
|
||||
|
||||
Reference in New Issue
Block a user