diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /browser/components/contextualidentity/test/browser/file_reflect_cookie_into_title.html | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/contextualidentity/test/browser/file_reflect_cookie_into_title.html')
-rw-r--r-- | browser/components/contextualidentity/test/browser/file_reflect_cookie_into_title.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/browser/components/contextualidentity/test/browser/file_reflect_cookie_into_title.html b/browser/components/contextualidentity/test/browser/file_reflect_cookie_into_title.html new file mode 100644 index 0000000000..cc05453507 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/file_reflect_cookie_into_title.html @@ -0,0 +1,22 @@ +<html> + <head> + <meta charset="UTF-8"> + <title>title not set</title> + <script> + // if we have a query string, use it to set the cookie and localStorage + if (window.location.search.length) { + let context_name = window.location.search.substr(1); + document.cookie = "userContextId=" + context_name; + localStorage.setItem("userContext", context_name); + } + + // get the cookie + let [name, val] = document.cookie.split("="); + + // set the title to reflect the cookie and local storage values we find + document.title = "cookie=" + val + "|" + + "local=" + localStorage.getItem("userContext"); + </script> + </head> + <body></body> +</html> |