function.js: fix compatibility with Safari

This commit is contained in:
Benjamin Renard 2020-06-03 11:53:37 +02:00
parent ff3ca35bed
commit 49656cd6f6

View file

@ -289,13 +289,12 @@ function generate_uuid() {
*
* Source : http://ntt.cc/2008/01/19/base64-encoder-decoder-with-javascript.html
*/
if ($type(atob) != 'function') {
var B64keyStr = "ABCDEFGHIJKLMNOP" +
"QRSTUVWXYZabcdef" +
"ghijklmnopqrstuv" +
"wxyz0123456789+/" +
"=";
if ($type(atob) != 'function') {
function btoa(input) {
input = escape(input);
var output = "";