mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-10-06 02:39:59 +02:00
making base-x compatible with node & browser
This commit is contained in:
parent
b12a099e29
commit
54d21a7803
4 changed files with 9 additions and 5 deletions
|
@ -6,7 +6,9 @@
|
|||
// Distributed under the MIT software license, see the accompanying
|
||||
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
var baseX = function base (ALPHABET) {
|
||||
(function(){
|
||||
'use strict';
|
||||
this.baseX = function base (ALPHABET) {
|
||||
if (ALPHABET.length >= 255) throw new TypeError('Alphabet too long')
|
||||
|
||||
const BASE_MAP = new Uint8Array(256)
|
||||
|
@ -146,3 +148,4 @@ var baseX = function base (ALPHABET) {
|
|||
decode: decode
|
||||
}
|
||||
}
|
||||
}).call(this);
|
|
@ -18,6 +18,7 @@ global.prettyPrint = window.PR.prettyPrint;
|
|||
global.prettyPrintOne = window.PR.prettyPrintOne;
|
||||
global.showdown = require('./showdown-1.8.6');
|
||||
global.DOMPurify = require('./purify-1.0.7');
|
||||
global.baseX = require('./base-x-3.0.5.1').baseX;
|
||||
require('./bootstrap-3.3.7');
|
||||
require('./privatebin');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue