diff options
author | Erik Michelson | 2020-08-27 02:04:49 +0200 |
---|---|---|
committer | Erik Michelson | 2020-08-27 02:04:49 +0200 |
commit | 824f910bfe39b8d789ca3edcfca44b66f603a81c (patch) | |
tree | 4038ca3553f9487eb1c476fa1d7b54355bd341b7 /public/js/lib/editor | |
parent | 23d54b8b4b3a9587220c9211d2a92c22609a4de8 (diff) |
Add config option for cookie SameSite policy
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Diffstat (limited to 'public/js/lib/editor')
-rw-r--r-- | public/js/lib/editor/index.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/public/js/lib/editor/index.js b/public/js/lib/editor/index.js index 07ef58a1..d86ebf3c 100644 --- a/public/js/lib/editor/index.js +++ b/public/js/lib/editor/index.js @@ -304,13 +304,13 @@ export default class Editor { if (this.editor.getOption('indentWithTabs')) { Cookies.set('indent_type', 'tab', { expires: 365, - sameSite: 'strict' + sameSite: window.cookiePolicy }) type.text('Tab Size:') } else { Cookies.set('indent_type', 'space', { expires: 365, - sameSite: 'strict' + sameSite: window.cookiePolicy }) type.text('Spaces:') } @@ -322,12 +322,12 @@ export default class Editor { if (this.editor.getOption('indentWithTabs')) { Cookies.set('tab_size', unit, { expires: 365, - sameSite: 'strict' + sameSite: window.cookiePolicy }) } else { Cookies.set('space_units', unit, { expires: 365, - sameSite: 'strict' + sameSite: window.cookiePolicy }) } widthLabel.text(unit) @@ -396,7 +396,7 @@ export default class Editor { var keymap = this.editor.getOption('keyMap') Cookies.set('keymap', keymap, { expires: 365, - sameSite: 'strict' + sameSite: window.cookiePolicy }) label.text(keymap) this.restoreOverrideEditorKeymap() @@ -445,7 +445,7 @@ export default class Editor { this.editor.setOption('theme', theme) Cookies.set('theme', theme, { expires: 365, - sameSite: 'strict' + sameSite: window.cookiePolicy }) checkTheme() @@ -491,7 +491,7 @@ export default class Editor { } Cookies.set('spellcheck', mode === 'spell-checker', { expires: 365, - sameSite: 'strict' + sameSite: window.cookiePolicy }) checkSpellcheck() @@ -537,7 +537,7 @@ export default class Editor { if (overrideBrowserKeymap.is(':checked')) { Cookies.set('preferences-override-browser-keymap', true, { expires: 365, - sameSite: 'strict' + sameSite: window.cookiePolicy }) this.restoreOverrideEditorKeymap() } else { |