mirror of
https://github.com/Ylianst/MeshCommander
synced 2025-12-06 06:03:20 +00:00
More OCR feature improvement.
This commit is contained in:
@@ -104,4 +104,10 @@ function random(max) { return Math.floor(Math.random() * max); }
|
||||
function trademarks(x) { return x.replace(/\(R\)/g, '®').replace(/\(TM\)/g, '™'); }
|
||||
|
||||
// Format
|
||||
function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
|
||||
function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
|
||||
|
||||
// Returns a UEFI boot parameter in binary
|
||||
function makeUefiBootParam(type, data, len) {
|
||||
if (typeof data == 'number') { if (len == 1) { data = String.fromCharCode(data & 0xFF); } if (len == 2) { data = ShortToStrX(data); } if (len == 4) { data = IntToStrX(data); } }
|
||||
return ShortToStrX(0x8086) + ShortToStrX(type) + IntToStrX(data.length) + data;
|
||||
}
|
||||
Reference in New Issue
Block a user