Skip to content

v04.00.02

Compare
Choose a tag to compare
@warren-bank warren-bank released this 26 Nov 21:10
· 83 commits to v04 since this release
release build: v04.00.02

update how encoding/decoding of cookie values should be handled

previous:
=========

* v04.00.00
  - URL encode cookie values when set: no
  - URL decode cookie values when get: yes
* v04.00.01
  - URL encode cookie values when set: yes
  - URL decode cookie values when get: yes

now:
====

* removes encoding/decoding from Java
* adds encoding/decoding to the Javascript API,
  as new optional `details` attributes
  - the API method signatures remain unchanged:
    * `GM_cookie.set(details, callback)`
      - if `details.encode` is truthy:
        ```javascript
          details.value = encodeURIComponent(details.value)
        ```
    * `GM_cookie.list(details, callback)`
      - if `details.decode` is truthy:
        ```javascript
          for (cookie of cookies) cookie.value = decodeURIComponent(cookie.value)
        ```
* default:
  - no encoding or decoding is performed
  - input and output cookie values are verbatim