summaryrefslogtreecommitdiff
path: root/public/js/index.js (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix revision redirect to index pageSheogorath2020-02-101-1/+1
| | | | | | | | | | | | | | | The revision view had a bug that clicking on a list entry would redirect the user back to the index page instead of providing the revision diff. This was cased by the baseurl which is now used as reference for hrefs. Therefore when clicking on the `href="#"` this was actually pointing at `<baseurl>#` which is usually the index page. This patch simply removes the href from the list items and therefore the link functionality. This fixes the whole problem by removing 9 characters from our source code. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Merge pull request #97 from SISheogorath/fix/lintingSheogorath2019-06-041-554/+558
|\ | | | | Fix eslint warnings
| * Fix eslint warningsSheogorath2019-05-311-554/+558
| | | | | | | | | | | | | | | | | | | | | | 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>
* | fixed styling of slides previewToma Tasovac2019-05-301-0/+2
|/ | | | Signed-off-by: Toma Tasovac <ttasovac@humanistika.org>
* Replace js-url with wurlSheogorath2019-04-161-2/+3
| | | | | | | | js-url is outdated and wurl is it's successor. This will fix some vulnerabilities in the dependencies and also optimize the build process by removing the external library toward internal tooling. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Move upload button into toolbarSheogorath2019-03-251-15/+0
| | | | | | | | | | | | | 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>
* Fix CI errors for unused variablesSheogorath2019-02-211-3/+2
| | | | Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Update from to-markdown to turndownSheogorath2018-11-211-2/+7
| | | | | | | | | | | | | | We got a security alert for a regular expression DoS attack on our used library `to-markdown`. After checking `to-markdown` to be maintained or not, it turned out they renamed the library to `turndown`. So upgrading to `turndown` should fix this vulnerbility. References: https://www.npmjs.com/package/to-markdown https://github.com/domchristie/turndown/wiki/Migrating-from-to-markdown-to-Turndown Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Merge pull request #1043 from SISheogorath/fix/tocEmptyHeadChristoph (Sheogorath) Kern2018-11-191-0/+1
|\ | | | | Fix ToC breaking documents with empty h* elements
| * Fix wrong anchorsSheogorath2018-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | While experimenting with the ToC changes, it became obvious that anchors for those unnamed headers don't work. This patch fixes those links by running the autolinkify twice and make sure linkify only adds links to non-empty ids. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* | switching to eslint for code checkingClaudius Coenen2018-11-141-1/+3
|/ | | | | | | 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>
* Add autocomplete for highlight.js languages into codemirrorSheogorath2018-10-101-1/+2
| | | | | | | | | | Right now we support code highlighting for rust, but it doesn't appear in autocomplete of codemirror, because codemirror is not aware of it. This patch lets highlightjs simply tell codemirror, what it supports and adds this to the autocomplete list. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Fix #986 : Visibility is now transmitted with gitlab V4 apiCédric Couralet2018-10-091-1/+1
| | | | Signed-off-by: Cédric Couralet <cedric.couralet@gmail.com>
* Add possibility to choose between version v3 or v4 for the gitlab api.Cédric Couralet2018-07-311-6/+11
| | | | | | | | Apart from the uri versioning, one big change is the snippet visibility post data (visibility_level -> visibility) Default gitlab api version to v4 Signed-off-by: Cédric Couralet <cedric.couralet@gmail.com>
* Fix liniting and optimize some functionsSheogorath2018-06-231-4/+2
| | | | | | | | | 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>
* Add a toolbar to Codemirror editorEdgar Zanella Alvarenga2018-06-191-0/+9
| | | | Signed-off-by: Edgar Zanella Alvarenga <e@vaz.io>
* Removing google drive integrationSheogorath2018-05-161-104/+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>
* Fix night mode button after restoreSheogorath2018-03-251-0/+1
| | | | | | | | | | | The night mode toggle doesn't get the right state after restore from local storage. This results in the need to toggle twice to disable night mode. This patch adds the needed class so the toggleNightMode function gets the right state on execution. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Persist nightmode so we can re-enable itSheogorath2018-03-231-3/+18
| | | | | | | | | Right now the night mode is possible to set by a toggle in the menu bar but needs to be re-enabled on every document switch, reload, etc.. This is super annoying so we should keep this state in local storage or a cookie. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* don't require referer to find note id in socket.io connections (fixes #623)Stefan Bühler2018-02-051-0/+3
| | | | Signed-off-by: Stefan Bühler <buehler@cert.uni-stuttgart.de>
* :sparkles: Implemented dark theme.Edoardo Odorico2018-01-051-0/+15
| | | | Signed-off-by: Edoardo Odorico <edoubuntu@gmail.com>
* Manage syncscroll / currentMode in appStateYukai Huang2017-05-071-34/+33
|
* Move syncsroll under libYukai Huang2017-05-071-1/+1
|
* Remove CodeMirror-other-cursors dom creationYukai Huang2017-05-071-3/+0
| | | | Since it’s done via hackmdio/CodeMirror#1
* Change more global var to globalYukai Huang2017-05-071-87/+87
|
* Extract modeTypeYukai Huang2017-05-071-11/+1
|
* Change some global variables to localYukai Huang2017-05-071-31/+31
|
* Fix indentationYukai Huang2017-05-071-6/+6
|
* Expose internal editor config variableYukai Huang2017-05-071-4/+3
|
* Update to support code block syntax highlighting of gherkinWu Cheng-Han2017-05-051-1/+1
|
* Fix indentationsYukai Huang2017-03-281-52/+48
|
* Drop global variable ui exposingYukai Huang2017-03-281-2/+0
|
* Update to es6 module import styleYukai Huang2017-03-281-7/+6
|
* Update cm instance in changes event argumentYukai Huang2017-03-281-1/+1
|
* Move updateStatusBar method into editor classYukai Huang2017-03-281-27/+7
|
* Add cm instance to cursorActivity argumentYukai Huang2017-03-281-2/+2
|
* Update focus argument with cm instanceYukai Huang2017-03-281-1/+1
|
* Rewrite cursorActivity with multi listener styleYukai Huang2017-03-281-17/+17
| | | | - adjust function order to prevent standard lint failure
* Extract selection update from updateStatusbarYukai Huang2017-03-281-25/+31
|
* Impl multiple codemirror event listenerYukai Huang2017-03-281-9/+9
|
* Change minor TODO to FIXMEYukai Huang2017-03-281-2/+2
|
* Update to add abc in support charts of textcompleteWu Cheng-Han2017-03-261-1/+1
|
* Fix text complete of extra tags for list not triggered properlyWu Cheng-Han2017-03-231-14/+14
|
* Fix google drive file picker not initialize properlyWu Cheng-Han2017-03-231-1/+3
|
* Fix front-end index.js code stylesWu Cheng-Han2017-03-221-24/+34
|
* Merge pull request #387 from hackmdio/cm-refactorMax Wu2017-03-141-560/+45
|\ | | | | Extract CodeMirror instance
| * Fix variable exporting errorYukai Huang2017-03-131-0/+3
| |
| * Merge branch 'master' into cm-refactorYukai Huang2017-03-131-3107/+2980
| |\
| * | Extract editor related codeYukai Huang2017-03-081-569/+31
| | | | | | | | | | | | - in public/js/lib/editor/index.js
* | | Fix rendering might result XSS attribute on self closing tag [Security Issue]Wu Cheng-Han2017-03-141-0/+2
| |/ |/|