summaryrefslogtreecommitdiff
path: root/public/js/extra.js (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-05-17Add simple support for cindyjscindystuebinm1-0/+43
Notably, the error output (in case of compiler errors) is generated by overwriting the builtin console.error-function, which is a horrible idea for many reasons, but there isn't really any other way right now.
2021-05-05Fix click handler for numbered task listsErik Michelson1-6/+6
The regex for tasklists in 1.x didn't include upper-case x/X letters nor ordered lists (1. [ ] abc). This commit changes the regex to allow both. Signed-off-by: Erik Michelson <opensource@erik.michelson.eu>
2021-02-15Linter: Fix all lint errorsPhilip Molares1-34/+40
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-12-27Don't store mermaid diagrams in innerHTMLDavid Mehren1-1/+1
Using jQuery's `.html()` method stores the given string as `innerHTML`, which enables injection of arbitrary DOM elements. Using `.text()` instead mitigates this issue. Signed-off-by: David Mehren <git@herrmehren.de>
2020-11-14Replace CodiMD with HedgeDocErik Michelson1-2/+2
Signed-off-by: Erik Michelson <github@erik.michelson.eu> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: References in public/views Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update links in README Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update links in SECURITY.md Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update links in LICENSE Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update links in docs/configuration.md Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update links in bin/setup Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: References in docs/guides Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: References in docs/dev Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: References in docs/guides/auth Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: References in docs/setup Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update various links in code to the new GitHub org. Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: codiMDVersion.js is now hedgeDocVersion.js Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: References in docs/setup/yunohost Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rebrand to HedgeDoc: Add banner and logo Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update links in docs/guides/migrate-etherpad Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Remove note in docs/guides/auth/github Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Replace links in public/docs/features Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Add todo placeholder in docs/history Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Replace github link in public/views/index/body Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Replace github link in README Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Add logo to README Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Add note about the renaming to the front page Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Removed Travis from README.md and change CodiMD to HedgeDoc in some places Signed-off-by: Yannick Bungers <git@innay.de> Some more renaming to HedgeDoc - Fixed capitalization of HedgeDoc - Added renaming for etherpad migration doc Signed-off-by: Yannick Bungers <git@innay.de> Changed Repo name to hedgedoc Signed-off-by: Yannick Bungers <git@innay.de>
2020-11-10Use URL constructor instead of regex to check for valid URLDavid Mehren1-9/+4
Fixes #545 Co-authored-by: Yannick Bungers <git@innay.de> Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-13Made changed/created status translatableErik Michelson1-3/+6
The current version of CodiMD/HedgeDoc does only support translations to be filled on server-side rendering. To allow the translation of the changed/created texts, I duplicated the container that holds the text, and pre-filed these containers with the translation server-side. The client just needs to hide the unneeded container and show the right one to show the translated status text. Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2020-08-13Restructured locale.js to be included into the editor's js bundleErik Michelson1-6/+2
Until now client-side translations were only possible in the context of the intro/history page, because the locale-detection logic relied on the language selector as a source of available languages. The editor of course has no such selector. With this commit, I copied the list of available languages from the i18n-initialization (server-side) to support language detection in the editor too. Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2020-08-13Fixed setting moment.js locale to user-defined languageErik Michelson1-1/+6
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2019-10-30make standard conform [fix]hoijui1-8/+5
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-30make `headerIds` `const` [fix]hoijui1-1/+1
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-30fix gfm header link generation with respect to `deduplicatedHeaderId`hoijui1-19/+69
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-22Allow to generate lower case header references through the confighoijui1-1/+5
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-10-22slight doc comment touch-up/simplification [minor]hoijui1-3/+3
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-05-31Fix eslint warningsSheogorath1-218/+218
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-04-16Fix stored XSS in the graphviz error message rendering [Security Issue]Max Wu1-6/+7
Signed-off-by: Max Wu <jackymaxj@gmail.com> Co-Authored-By: Sheogorath <sheogorath@shivering-isles.com>
2019-03-09Fix broken HTML export with emojisSheogorath1-1/+1
HTML export was broken due to missing alt-attribute for emojis. This patch adds the old alt-element style and restores the exportability this way. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-02-21Remove broken speakerdeck embeddingSheogorath1-28/+7
The current speakerdeck implementation is broken. An alternative implementation using oembed doesn't work due to CORS, which could be solved by proxying the speakerdeck API, but we decided to not do this. This patch provides the link to the speakerdeck presentation instead, and this way doesn't break existing notes. This is right now the best solution we could come up with. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-11-19Fix wrong anchorsSheogorath1-2/+4
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>
2018-10-31Again: Replace emoji-plugin regexSheogorath1-7/+6
The Regex introduced in the last commit[1], was already working quite good. But still resulted in false positives for all URL that contained a second `:`. To fix this once and for all, we craft a simple, but long regex based on all emoji names and use this to match them. We could probably optimize it, but that should also be something the regex engine itself can and should do. [1]: 7e45533c75a3697c916e52e5f4ddff42a38bd3d5 (in this source tree) Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-10-29Fix emoji regexSheogorath1-1/+1
The old regex, adapted from the other plugins, was a bit too open for matching. This leads to matching something like: `This is a sentence: [And something with a: in it.]()` which doesn't become a link anymore. Because the match is: ` [And something with a`. This patch provides a fix for the regex to only match non-space string within the `:`'s. References: - Introducing commit: https://github.com/hackmdio/codimd/commit/2063eb8bdf9c0537e9fcfadd7f587658c72bd281 - Inspirational source of the original RegEx: https://github.com/hackmdio/codimd/blob/2063eb8bdf9c0537e9fcfadd7f587658c72bd281/public/js/extra.js#L1095 Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-10-10Remove dead package octiconSheogorath1-1/+1
Octicon no longer provides its CSS classes and this way is useless in CodiMD. Replacing all used classes in the UI and remove it from build system. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-10-10Fix not rendered autocomplete emojisSheogorath1-0/+15
Currently we have some emojis that are autocompleted but won't show up in the resulting document. This patch adds all emojis that are pushed to Codemirror and applies them to the markdown rendering process, so they become usable. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-10-04Add rel="noopener" to target="_blank" linksSheogorath1-1/+3
The noopener construct protects from some nasty clickjacking attacks. We can apply them savely to all our links since we don't rely on the previously used page. Some more details: https://mathiasbynens.github.io/rel-noopener/ Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-24Rebrand HackMD to CodiMDSheogorath1-2/+2
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-01-24Fix task todo might not toggleMax Wu1-2/+2
which caused by not matching syntax with double dashes correctly
2018-01-19Fix image alt not render properlyWu Cheng-Han1-1/+2
2018-01-16Fix anchor id to keep uppercase charactersMax Wu1-1/+5
id shouldn’t be converted to lowercase since id attribute is case sensitive
2017-10-30Fix mermaid error handlingSheogorath1-2/+7
2017-10-30Use mermaidAPI in mermaid scopeSheogorath1-12/+4
Introduced by https://github.com/knsv/mermaid/commit/a5b71455271aef1180eefa1054d751dea1885e3f#diff-67ae90c5144c55348a3cbdb078240454L532 Fixes #600 Parse only throws error: https://github.com/knsv/mermaid/commit/167368d508f1e5b1606b2b45f892cdd60d479448#diff-67ae90c5144c55348a3cbdb078240454
2017-10-21Fix markdown-it gist plugin code closing tagYukai Huang1-1/+1
fix #596
2017-10-05Fix to filter @import CSS syntax in style tag to prevent XSS [Security Issue]Wu Cheng-Han1-4/+9
2017-10-05Fix unescape > symbol inside the style tags to make the CSS worksWu Cheng-Han1-0/+4
2017-05-08style: Fixed variable already declaredBoHong Li1-2/+2
2017-05-05Update to support code block syntax highlighting of gherkinWu Cheng-Han1-1/+2
2017-03-28Drop global variable ui exposingYukai Huang1-3/+6
2017-03-26Update to change makefile syntax highlighting to PrismWu Cheng-Han1-0/+6
2017-03-26Fix code styleWu Cheng-Han1-1/+1
2017-03-26Add support of abcjsWu Cheng-Han1-0/+22
2017-03-22Fix todo list item class might add in wrong elementWu Cheng-Han1-1/+5
2017-03-22Fix unnecessary global calling of owneruiWu Cheng-Han1-1/+1
2017-03-14Fix export html to replace fallen cdn tortue.me to cdnjsWu Cheng-Han1-1/+1
2017-03-14Fix rendering might result XSS attribute on self closing tag [Security Issue]Wu Cheng-Han1-0/+13
2017-03-09Use JavaScript Standard Style (part 2)BoHong Li1-977/+967
Fixed all fail on frontend code.
2017-02-03Fix duplicated headers anchor link not been updated properlyWu Cheng-Han1-1/+1
2017-02-03Fix "[object HTMLCollection] is not iterable!" error in some browsersWu Cheng-Han1-1/+2
2017-02-03Removed UTF-8 BOM in download functionNV1-2/+2
2017-02-02Upgrade viz.js to fix manual workaround and get smaller file sizeWu Cheng-Han1-21/+12
2017-01-13Rename common.js to login.jsYukai Huang1-1/+1
2017-01-05Convert extra.js to es6Yukai Huang1-332/+305