Commit Graph

37 Commits

Author SHA1 Message Date
Jan Cernik 3918061c50
DEV: Replace bootbox alert dialog (#13) 2022-10-31 08:04:38 -03:00
Joffrey JAFFEUX be75773375
FIX: fully rely on keyValueStore to prevent error (#12)
* FIX: fully rely on keyValueStore to prevent error

The component was generating errors for some users due to direct access to `localStorage`:

```
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Object.expireOldValues (https://d3bpeqsaub0i6y.cloudfront.net/theme-javascripts/33bf35dc19b970a42f8c1e7d57d8cc72d6205bbd.js?__ws=meta.discourse.org:157:14)
    at Object.initialize (https://d3bpeqsaub0i6y.cloudfront.net/theme-javascripts/33bf35dc19b970a42f8c1e7d57d8cc72d6205bbd.js?__ws=meta.discourse.org:193:12)
    at o.initialize (https://d11a6trkgmumsb.cloudfront.net/assets/discourse-2bd9a9aa6b5c9cbee990a03159f5bff41fe503fe74814c3b66b3770876913dd5.gz.js:68:38)
```

This commits removes old unnecessary code using cookies and uses latest API from core `removeKeys`. Old discourse instances will just not evict old keys which is a minor annoyance.

* linting
2022-08-22 00:25:50 +02:00
Jarek Radosz faf88c2209
DEV: Fix `key-value-store:main` deprecation (#11) 2022-08-13 22:40:11 +02:00
Jarek Radosz ba7ca9e588
DEV: Fix typo (#10) 2022-08-13 22:39:58 +02:00
Jarek Radosz 1c4f5b1a99
DEV: Add CI setup and fix linting issues (#9) 2022-06-18 21:27:31 +02:00
dependabot[bot] c9dde66727
Build(deps): bump minimist from 1.2.5 to 1.2.6 (#8)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-31 11:53:13 +02:00
David Taylor 9a002eed80
FIX: Dropdowns following recent refactoring (#7) 2022-01-13 16:48:07 -08:00
David Taylor 9882e993c5 DEV: Remove JQuery 2022-01-13 13:02:06 +00:00
David Taylor 468cf81fd2 DEV: Migrate to local storage
Setting cookies means that they're sent in the request headers for every HTTP request. This will have a (tiny) impact on performance, plus it can raise privacy concerns. Using localStorage is more appropriate for this use case.

This commit includes migration logic for any previously-saved values.

Previously the cookies were set to last for the 'session'. localStorage doesn't have an expiration mechanism, so this commit implements a 7-day expiration on the values.
2022-01-13 13:02:06 +00:00
David Taylor 6c43321b28 DEV: Apply prettier, remove es6 extension 2022-01-13 13:02:06 +00:00
Jarek Radosz 3adf5b8300
DEV: Use `cookie` imports (#5)
Fixes deprecation warnings.
2021-10-28 19:40:25 +02:00
Robin Ward bd544c3f38
FIX: `modifyClass` deprecation (#3) 2021-09-03 13:43:45 -04:00
jjaffeux 19fcc3210c UX: makes texts more readable 2021-06-01 11:38:29 +02:00
jjaffeux 3f0a5f7802 FIX: uses var for dark-light-choose 2021-06-01 11:37:12 +02:00
jjaffeux 3d0d4f2ca2 FIX: updates blend to use var 2021-06-01 11:34:59 +02:00
jjaffeux 248121c094 FIX: uses var for colors 2021-06-01 11:31:53 +02:00
dependabot[bot] 8ef85fc7d1
Build(deps): bump lodash from 4.17.19 to 4.17.21 (#2)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 10:28:24 -04:00
tshenry 6a3852e373
Update about.json 2021-03-04 16:22:57 -08:00
dependabot[bot] 8e41644cd5
Build(deps): bump lodash from 4.17.15 to 4.17.19 (#1)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-20 12:05:05 -04:00
jjaffeux 222e50bacb FIX: ensures we can rewrite links
This selector was too specific and would end up catching a directlyt wich would result in innerHTML being the text of the link and not the full link.
2020-04-24 11:19:36 +02:00
jjaffeux 81bbc2080a removes links and clear placeholders for now
It works well, but is too much noise for the value
2020-04-22 12:41:42 +02:00
jjaffeux e49d7411e5 FIX: better detection of default value 2020-04-20 20:39:54 +02:00
jjaffeux f947865904 FIX: ensures correct updates on input and clear 2020-04-20 17:07:04 +02:00
jjaffeux 1fab87e976 FIX: do not placeholder the placeholder 2020-04-20 17:06:49 +02:00
jjaffeux c1e02d7c2f FIX: improves links position when many links 2020-04-20 16:13:20 +02:00
jjaffeux 3726aa75e3 REFACTOR: various code/UI/UX changes and refactorings
- ability to clear placeholders
- builder UI
- link to placeholder
- improve styles
2020-04-20 16:07:10 +02:00
jjaffeux 6f46840fb1 linting 2020-04-14 17:04:41 +02:00
Joffrey JAFFEUX 1e8edaddfa FIX: more efficient matching 2019-06-26 23:17:38 +02:00
Joffrey JAFFEUX 49b501ca20 DEV: adds decorateCooked id to prevent leaks 2019-06-24 12:54:37 +02:00
Joffrey JAFFEUX 179e86d3e4 FEATURE: adds support for optional delimiter 2019-06-21 16:41:53 +02:00
Joffrey JAFFEUX 4f2a5a2f89 FIX: initial process should also be delayed 2019-05-30 10:57:57 +02:00
Joffrey JAFFEUX b2400e1255
FIX: waits libs (highlightjs) to process post before acting 2019-05-30 10:18:49 +02:00
Joffrey JAFFEUX 41408e51fa
Update README.md 2019-05-30 10:17:22 +02:00
Joffrey JAFFEUX 4278f02385
Create README.md 2019-05-20 13:26:14 +02:00
Joffrey JAFFEUX 6bf6ccb095 FEATURE: saved state 2019-05-14 12:26:11 +02:00
Joffrey JAFFEUX 2461cab04e it's a component 2019-05-14 11:22:19 +02:00
Joffrey JAFFEUX 412875b25b init 2019-05-14 11:18:12 +02:00