Open cloudswave opened 12 months ago
I probably won't be able to start working on it for a few days, but from a technical standpoint.. it seems doable. I'll let you know when I have a version available.
quick update..
I've been struggling with how encoding/decoding should be handled:
I think I'll release (shortly) another version, which:
removes encoding/decoding from Java
adds encoding/decoding to the Javascript API, as a new optional details
attribute
GM_cookie.set(details, callback)
details.encode
is truthy:
details.value = encodeURIComponent(details.value)
GM_cookie.list(details, callback)
details.decode
is truthy:
for (cookie of cookies) cookie.value = decodeURIComponent(cookie.value)
one technical note:
@grant GM_cookie
is required to use this new featureupdate..
4.0.2 does exactly what I previously described.. which seems like the best compromise
btw, there are 2 relevant test userscripts.. that I used to validate behavior:
PPS: they use console.log
statements..
adb
chrome://inspect/#devices
it would probably be simpler to:
var callback = function(cookies) {
cookies = JSON.stringify(cookies, null, 2)
unsafeWindow.confirm(cookies)
unsafeWindow.document.body.appendChild(
unsafeWindow.document.createTextNode(cookies)
)
}
The API document GM_cookie