Set URL input parameter when setting input.

(e.g. when tab changed or removed)
This commit is contained in:
j433866 2019-06-04 11:59:44 +01:00
parent 99e9df0211
commit 0e5944e9c6
1 changed files with 10 additions and 0 deletions

View File

@ -352,6 +352,16 @@ class InputWaiter {
const lines = inputData.input.length < (this.app.options.ioDisplayThreshold * 1024) ?
inputData.input.count("\n") + 1 : null;
this.setInputInfo(inputData.input.length, lines);
// Set URL to current input
const inputStr = toBase64(inputData.input, "A-Za-z0-9+/");
if (inputStr.length > 0 && inputStr.length <= 68267) {
this.setUrl({
includeInput: true,
input: inputStr
});
}
if (!silent) window.dispatchEvent(this.manager.statechange);
} else {
this.setFile(inputData);