mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-07-17 16:39:40 +00:00
avoid mjs for now, inject map, Buffer is node-only
This commit is contained in:
parent
68548c9c73
commit
fbfe87d993
6 changed files with 10 additions and 10 deletions
2
js/zlib-1.3.2.js
Normal file
2
js/zlib-1.3.2.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -9,8 +9,8 @@
|
|||
const COMPRESSION_LEVEL = 7;
|
||||
const NO_ZLIB_HEADER = -1;
|
||||
const CHUNK_SIZE = 32 * 1024;
|
||||
const Module = await import('zlib-1.3.2.mjs');
|
||||
Module.map = {};
|
||||
const createModule = (await import('./zlib-1.3.2.js')).default;
|
||||
const Module = await createModule({map: {}});
|
||||
const srcPtr = Module.__malloc(CHUNK_SIZE);
|
||||
const dstPtr = Module.__malloc(CHUNK_SIZE);
|
||||
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
}
|
||||
|
||||
getBuffer() {
|
||||
return Buffer.from(this.buff.buffer, 0, this.offset);
|
||||
return this.buff.slice(0, this.offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
}
|
||||
|
||||
getBuffer() {
|
||||
return Buffer.from(this.buff.buffer, 0, this.offset);
|
||||
return this.buff.slice(0, this.offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -125,8 +125,8 @@ class Configuration
|
|||
'js/privatebin.js' => 'sha512-6SwOJniNN8RBmAK7yCt4ly2qYyH8OALxB74/K1AJgw+YnZgRCfTDVq1qY1K5Y2QCxCODGGTpAjTqQRExzCqV7g==',
|
||||
'js/purify-3.3.2.js' => 'sha512-I6igPVpf3xNghG92mujwqB6Zi3LpUTsni4bRuLnMThEGH6BDbsumv7373+AXHzA4OUlxGsym8ZxKFHy4xjYvkQ==',
|
||||
'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==',
|
||||
'js/zlib-1.3.2.mjs' => 'sha512-rv8vIHS886FB1BwNSDK2ePuAlQ2kjuCKyKfu6R6xrUaBW74XJwUkgBkYwb2Qo48JGcfenzJuJWnj7aunxXkyIw==',
|
||||
'js/zlib.js' => 'sha512-WrCFRc7+7FdFDhN86LQ0g8GHzwhGIqPJ29NBGu2xM3cqkCC9GSMZf/24dhg6+iQs1xjcnWjandBFIOP7xCBUpg==',
|
||||
'js/zlib-1.3.2.js' => 'sha512-RAhJgxg9siMIA8ky4c10Rc2zUgnK80olHB8Tt1IOYWY4Eh1WmrviQkDn+sgBlb38ZHq3tzufGC41kP360gmosQ==',
|
||||
'js/zlib.js' => 'sha512-QOaEwssHqHRRcWJ2Un3Kl2Zhyprzl7T8zmsKN2FppFxW3VR+8UChYOx2iuL0HbXK42fuBWJm5PNQJxufulrt/w==',
|
||||
),
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ if ($SYNTAXHIGHLIGHTING) :
|
|||
endif;
|
||||
?>
|
||||
<noscript><link type="text/css" rel="stylesheet" href="css/noscript.css" /></noscript>
|
||||
<?php $this->_linkTag('js/zlib-1.3.2.mjs'); ?>
|
||||
<?php $this->_linkTag('js/zlib-1.3.2.js'); ?>
|
||||
<?php $this->_scriptTag('js/jquery-3.7.1.js', 'defer'); ?>
|
||||
<?php
|
||||
if ($QRCODE) :
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ if ($SYNTAXHIGHLIGHTING) :
|
|||
endif;
|
||||
?>
|
||||
<noscript><link type="text/css" rel="stylesheet" href="css/noscript.css" /></noscript>
|
||||
<?php $this->_linkTag('js/zlib-1.3.2.mjs'); ?>
|
||||
<?php $this->_linkTag('js/zlib-1.3.2.js'); ?>
|
||||
<?php $this->_scriptTag('js/jquery-3.7.1.js', 'defer'); ?>
|
||||
<?php
|
||||
if ($QRCODE) :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue