We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GM_cookie
expirationDate
GM_cookie.list
GM.cookies
GM.cookie
GM.cookie.list()
GM.cookie.list({})
Adapted from #465 (comment)
// ==UserScript== // @name Test cookie // @namespace xxx // @version xxx // @description xxx // @author xxx // @match *://*/* // @grant GM.xmlHttpRequest // @grant GM.cookie // @connect httpbin.org // ==/UserScript== const getRandomString = () => (new Date()).getTime().toString(36) + Math.random().toString(36).slice(2); const d = getRandomString(); await GM.xmlHttpRequest({ url: 'https://httpbin.org/response-headers?set-cookie=partitioned='+d+';path=/;expires=Wed,%2021%20Sep%202033%2015:59:37%20GMT;httponly;secure;samesite=none;partitioned' }) await GM.xmlHttpRequest({ url: 'https://httpbin.org/response-headers?set-cookie=nonpartitioned='+d+';path=/;expires=Wed,%2021%20Sep%202033%2015:59:37%20GMT;httponly;secure;samesite=none' }) console.log('expected value', d); console.log("Arg: {...}", await GM.cookie.list({ url: 'https://httpbin.org/', partitionKey: {} })); // Success console.log("Arg: {}", await GM.cookie.list({})); // Success console.log("Arg: undefined", await GM.cookie.list()); // Never resolves
The text was updated successfully, but these errors were encountered:
No branches or pull requests
expirationDate
not present at the documentation of cookie objects underGM_cookie.list
.GM.cookies
under "Example usage" - it should beGM.cookie
.GM.cookie.list()
doesn't return, butGM.cookie.list({})
works as expected.Specifications
Script
Adapted from #465 (comment)
The text was updated successfully, but these errors were encountered: