mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
style(es_extended): run prettier
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
@font-face {
|
||||
font-family: 'Pricedown';
|
||||
src: url('../fonts/pdown.ttf');
|
||||
font-family: "Pricedown";
|
||||
src: url("../fonts/pdown.ttf");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'bankgothic';
|
||||
src: url('../fonts/bankgothic.ttf');
|
||||
font-family: "bankgothic";
|
||||
src: url("../fonts/bankgothic.ttf");
|
||||
}
|
||||
|
||||
html {
|
||||
@@ -20,11 +20,12 @@ html {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
|
||||
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
|
||||
1px 1px 0 #000;
|
||||
}
|
||||
|
||||
.menu {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
min-width: 400px;
|
||||
min-height: 250px;
|
||||
color: #fff;
|
||||
@@ -34,7 +35,7 @@ html {
|
||||
}
|
||||
|
||||
.menu .head {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
font-size: 28px;
|
||||
padding: 10px;
|
||||
background: #1a1a1a;
|
||||
@@ -51,14 +52,14 @@ html {
|
||||
}
|
||||
|
||||
.menu .head span {
|
||||
font-family: 'Pricedown';
|
||||
font-family: "Pricedown";
|
||||
font-size: 28px;
|
||||
padding-left: 15px;
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
.menu .menu-items .menu-item {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
font-size: 14px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
|
||||
@@ -1,38 +1,40 @@
|
||||
(() => {
|
||||
ESX = {};
|
||||
ESX = {};
|
||||
|
||||
ESX.inventoryNotification = function (add, label, count) {
|
||||
let notif = '';
|
||||
ESX.inventoryNotification = function (add, label, count) {
|
||||
let notif = "";
|
||||
|
||||
if (add) {
|
||||
notif += '+';
|
||||
} else {
|
||||
notif += '-';
|
||||
}
|
||||
if (add) {
|
||||
notif += "+";
|
||||
} else {
|
||||
notif += "-";
|
||||
}
|
||||
|
||||
if (count) {
|
||||
notif += count + ' ' + label;
|
||||
} else {
|
||||
notif += ' ' + label;
|
||||
}
|
||||
if (count) {
|
||||
notif += count + " " + label;
|
||||
} else {
|
||||
notif += " " + label;
|
||||
}
|
||||
|
||||
let elem = $('<div>' + notif + '</div>');
|
||||
$('#inventory_notifications').append(elem);
|
||||
let elem = $("<div>" + notif + "</div>");
|
||||
$("#inventory_notifications").append(elem);
|
||||
|
||||
$(elem).delay(3000).fadeOut(1000, function () {
|
||||
elem.remove();
|
||||
});
|
||||
};
|
||||
$(elem)
|
||||
.delay(3000)
|
||||
.fadeOut(1000, function () {
|
||||
elem.remove();
|
||||
});
|
||||
};
|
||||
|
||||
window.onData = (data) => {
|
||||
if (data.action === 'inventoryNotification') {
|
||||
ESX.inventoryNotification(data.add, data.item, data.count);
|
||||
}
|
||||
};
|
||||
window.onData = (data) => {
|
||||
if (data.action === "inventoryNotification") {
|
||||
ESX.inventoryNotification(data.add, data.item, data.count);
|
||||
}
|
||||
};
|
||||
|
||||
window.onload = function (e) {
|
||||
window.addEventListener('message', (event) => {
|
||||
onData(event.data);
|
||||
});
|
||||
};
|
||||
window.onload = function (e) {
|
||||
window.addEventListener("message", (event) => {
|
||||
onData(event.data);
|
||||
});
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -1,42 +1,35 @@
|
||||
(() => {
|
||||
let ESXWrapper = {};
|
||||
ESXWrapper.MessageSize = 1024;
|
||||
ESXWrapper.messageId = 0;
|
||||
|
||||
let ESXWrapper = {};
|
||||
ESXWrapper.MessageSize = 1024;
|
||||
ESXWrapper.messageId = 0;
|
||||
window.SendMessage = function (namespace, type, msg) {
|
||||
ESXWrapper.messageId =
|
||||
ESXWrapper.messageId < 65535 ? ESXWrapper.messageId + 1 : 0;
|
||||
const str = JSON.stringify(msg);
|
||||
|
||||
window.SendMessage = function (namespace, type, msg) {
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
let count = 0;
|
||||
let chunk = "";
|
||||
|
||||
ESXWrapper.messageId = (ESXWrapper.messageId < 65535) ? ESXWrapper.messageId + 1 : 0;
|
||||
const str = JSON.stringify(msg);
|
||||
while (count < ESXWrapper.MessageSize && i < str.length) {
|
||||
chunk += str[i];
|
||||
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
count++;
|
||||
i++;
|
||||
}
|
||||
|
||||
let count = 0;
|
||||
let chunk = '';
|
||||
i--;
|
||||
|
||||
while (count < ESXWrapper.MessageSize && i < str.length) {
|
||||
const data = {
|
||||
__type: type,
|
||||
id: ESXWrapper.messageId,
|
||||
chunk: chunk,
|
||||
};
|
||||
|
||||
chunk += str[i];
|
||||
if (i == str.length - 1) data.end = true;
|
||||
|
||||
count++;
|
||||
i++;
|
||||
}
|
||||
|
||||
i--;
|
||||
|
||||
const data = {
|
||||
__type: type,
|
||||
id: ESXWrapper.messageId,
|
||||
chunk: chunk
|
||||
}
|
||||
|
||||
if (i == str.length - 1)
|
||||
data.end = true;
|
||||
|
||||
$.post('http://' + namespace + '/__chunk', JSON.stringify(data));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})()
|
||||
$.post("http://" + namespace + "/__chunk", JSON.stringify(data));
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user