From 487e15e429027673696c75e6cce40c697ace086e Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Sat, 5 Mar 2022 23:51:03 +0100 Subject: [PATCH] fix content type --- chrome/manifest.json | 2 +- chrome/script.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/manifest.json b/chrome/manifest.json index 3b1735d..b3df8f3 100644 --- a/chrome/manifest.json +++ b/chrome/manifest.json @@ -7,7 +7,7 @@ "48": "icon-48.png", "128": "icon-128.png" }, - "version": "107.0", + "version": "108.0", "manifest_version": 3, "host_permissions": ["http://127.0.0.1:4000/jsonrpc"], "permissions": ["tabs"], diff --git a/chrome/script.js b/chrome/script.js index 60aaa17..f6576a8 100644 --- a/chrome/script.js +++ b/chrome/script.js @@ -8,7 +8,7 @@ providers.set("seafile.purser.it", "seafile") const random = () => { const arr = new Uint8Array(32) window.crypto.getRandomValues(arr) - return btoa(arr) + return [...arr].map(x => x.toString(16).padStart(2, "0")).join("") } document.addEventListener("DOMContentLoaded", () => { @@ -75,7 +75,7 @@ document.addEventListener("DOMContentLoaded", () => { method: "POST", body: JSON.stringify(req), headers: { - "Content-Type": "application/json charset=utf-8" + "Content-Type": "application/json; charset=utf-8" } }).then(resp => console.log(resp)) } catch(e) {