This commit is contained in:
Benjamin Pasero
2020-12-10 09:13:56 +01:00
parent c7fa31fc92
commit 039f15a0f9
5 changed files with 44 additions and 44 deletions

View File

@@ -1602,3 +1602,9 @@ export class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
this._subscriptions.dispose();
}
}
export function getCookieValue(name: string): string | undefined {
const match = document.cookie.match('(^|[^;]+)\\s*' + name + '\\s*=\\s*([^;]+)'); // See https://stackoverflow.com/a/25490531
return match ? match.pop() : undefined;
}