Improve autobake further to behave more like it did before.

Improve generation of state URI.
This commit is contained in:
j433866 2019-05-02 13:54:15 +01:00
parent 82183bf204
commit 8e9717906f
5 changed files with 59 additions and 38 deletions

View file

@ -459,6 +459,15 @@ class InputWaiter {
value: value
}
});
let includeInput = false;
const recipeStr = toBase64(value, "A-Za-z0-9+/"); // B64 alphabet with no padding
if (recipeStr.length > 0 && recipeStr.length <= 68267) {
includeInput = true;
}
this.setUrl({
includeInput: includeInput,
input: recipeStr
});
}
/**
@ -1214,7 +1223,7 @@ class InputWaiter {
* @param {string} urlData.input
*/
setUrl(urlData) {
this.app.updateUrl(urlData.includeInput, urlData.input);
this.app.updateTitle(urlData.includeInput, urlData.input, true);
}