summaryrefslogtreecommitdiff
path: root/public/js/lib (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-05-05Fix insertOnStartOfLines behaviourDavid Mehren1-4/+7
A bug in insertOnStartOfLines lead to duplicated text, if the cursor was not at the start of a line. This fixes the behaviour of insertOnStartOfLines to always use the complete first and last line of the selection, even if they were only partially selected. Fixes #1231 Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-15Linter: Fix all lint errorsPhilip Molares6-97/+100
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-11-26Remove pdf export codeTilman Vatteroth1-2/+1
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-08-27Add config option for cookie SameSite policyErik Michelson3-10/+12
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2020-06-08Set all cookies with sameSite: strictDavid Mehren2-10/+20
Modern browsers do not support (or will stop supporting) sameSite: none (or no sameSite attribute) without the Secure flag. As we don't want everyone to be able to make requests with our cookies anyway, this commit sets sameSite to strict. See https://developer.mozilla.org/de/docs/Web/HTTP/Headers/Set-Cookie/SameSite Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-30linkifyHeaderStyle needs no string-ification; is already str.hoijui1-1/+1
Co-Authored-By: Yukai Huang <yukaihuangtw@gmail.com> Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-22Allow to generate lower case header references through the confighoijui1-0/+2
This makes the references consistent/compatible with GitHub, GitLab, Pandoc and many other tools. This behavior can be enabled in config.json with: ``` "linkifyHeaderStyle": "gfm" ``` Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-05-31Fix eslint warningsSheogorath3-25/+25
Since we are about to release it's time to finally fix our linting. This patch basically runs eslint --fix and does some further manual fixes. Also it sets up eslint to fail on every warning on order to make warnings visable in the CI process. There should no functional change be introduced. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-05-12Fix toolbar day modePedro Ferreira2-15/+17
Also moved the code to SCSS Signed-off-by: Pedro Ferreira <pedro@dete.st>
2019-05-12Make upload button respect night modePedro Ferreira2-4/+4
Also set a title in the input field, so that the file name doesn't show up. Signed-off-by: Pedro Ferreira <pedro@dete.st>
2019-03-25Move upload button into toolbarSheogorath3-2/+13
Currently we have the odd situation to have two toolbars. One inside the header and one in the editor. Since we only show the image upload button when the editor is visible we should move the upload button into the editor toolbar. This patch does this by adding the image upload button besides the image tag button. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-11-14switching to eslint for code checkingClaudius Coenen2-5/+5
most rules degraded to WARN, so we don't go insane. This will change over time. The aim is to conform to a common style Signed-off-by: Claudius Coenen <opensource@amenthes.de>
2018-07-08Fix some false titlesAlexander Wellbrock1-2/+2
Signed-off-by: Alexander Wellbrock <a.wellbrock@mailbox.org>
2018-06-26Fix broken unicode urlsSheogorath1-1/+1
It wasn't possible to create unicode based URLs in freeurl mode, because the noteid used for the websocket connection is double escaped. When we decode it and let socketio-client reencode it, we get the real shortid/noteid and can find the note in the database and open the connection. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-23Fix all newly introduced linting issuesSheogorath1-10/+10
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-23Fix liniting and optimize some functionsSheogorath2-43/+72
First fixed some linting issues. Also optimized some functions to be undoable with one ctrl+z. This should also speedup some operations Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-19Add a toolbar to Codemirror editorEdgar Zanella Alvarenga3-0/+175
Signed-off-by: Edgar Zanella Alvarenga <e@vaz.io>
2018-05-16Removing google drive integrationSheogorath3-6/+0
It's sad but it's not working. For multiple releases this should be already broken which shows how often it's used. As there is also a security issue related to that, it's better to remove the feature completely. Whoever wants to rewrite it, feel free to go. This commit removes the Google Drive integration from HackMD's Frontend editor and this way removes the need to provide any API key and Client ID in the frontend. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-02-24Allow the usage of the esc-key by codemirrorSheogorath1-3/+3
This change allows all input modes of codemirror to use the information from an input esc-key and make this way vim and sublime more functional. To prevent this change from breaking the return from the fullscreen mode, it catches the esc-key in this case. Hopefully this is an acceptable solution. As before the vim-mode is handled different in fulltext-mode as it is esc-key heavy. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-01-20Allow more detailed configuration of upload mime typesSheogorath1-1/+3
Fixes #637 Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-01-05:sparkles: Implemented dark theme.Edoardo Odorico2-1/+3
Signed-off-by: Edoardo Odorico <edoubuntu@gmail.com>
2017-10-30Corrected some grammatical issuesOliver Herrmann1-3/+3
Obviously caught up in a bad translation and didn't particularly make sense for native english speakers.
2017-09-27Fix home and end keys behavior for windowsWu Cheng-Han1-0/+2
2017-05-07Manage syncscroll / currentMode in appStateYukai Huang3-14/+25
2017-05-07Move syncsroll under libYukai Huang1-0/+368
2017-05-07Extract modeTypeYukai Huang1-0/+11
2017-05-07Expose internal editor config variableYukai Huang1-0/+1
2017-05-07Load statusbar template by string-loaderYukai Huang2-34/+61
2017-03-28Move updateStatusBar method into editor classYukai Huang2-0/+28
2017-03-28Fix listener “this” contextYukai Huang1-1/+1
2017-03-28Promisify getStatusBarTemplate methodYukai Huang1-26/+28
2017-03-28Extract selection update from updateStatusbarYukai Huang1-1/+2
2017-03-28Impl multiple codemirror event listenerYukai Huang1-0/+13
2017-03-20Update to generate front-end constants on server startupWu Cheng-Han2-11/+15
To avoid extra webpacking on changing configs and follow the 12 factor app
2017-03-13Fix variable exporting errorYukai Huang1-3/+1
2017-03-09Use JavaScript standard styleYukai Huang3-541/+568
2017-03-09Use JavaScript Standard Style (part 2)BoHong Li2-79/+82
Fixed all fail on frontend code.
2017-03-08Extract editor related codeYukai Huang2-0/+505
- in public/js/lib/editor/index.js
2017-03-07Extract UI jquery nodeYukai Huang1-0/+84
2017-01-14Minor style updateYukai Huang1-1/+1
2017-01-13Add default value for configYukai Huang1-6/+6
2017-01-13Rename common.js to login.jsYukai Huang1-0/+92
2017-01-13Move config variable to lib/configYukai Huang1-0/+19