docbrown/app/assets/javascripts
Dmitry Maksyoma f63c7f9289
Fix Runkit tags not being activated when comment is added (#6767)
* Fix Runkit tags not being activated when comment is added

* Runkit tag activation was ran once, on page load. I've changed it to
  run on on comment preview and submit.
* It was necessary to add a check to skip already activated Runkit
  tags. The code didn't take into account that a tag could be already
  processed, and would just crash.

* Fix Runkit tags and add tests

* Add test for previewing article with Runkit tag

* "Fix CodeClimate not finding waitForRunkitAndActivateTags()

* Refactor a test for readability

* Make Rubocop happy

* Improve test for previewing article with Runkit tag

* Use one method for determining active Runkit tags

* Defer loading of JS from embed.runkit.com

* Add utility function dynamicallyLoadScript(url)

* Switch to dynamic loading of Runkit

* parsed content code block is also hidden now to avoid displaying <code /> block before runkit iframe loads.

* Fix Runkit test

* Remove Runkit script caching in v2 form

* Use <%== instead of .html_safe in v2 form

* Update app/assets/javascripts/utilities/dynamicallyLoadScript.js

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-05-15 14:27:46 +02:00
..
initializers Fix Runkit tags not being activated when comment is added (#6767) 2020-05-15 14:27:46 +02:00
lib Fix lint errors in pulltorefresh.js (#4594) [ci skip] 2019-10-30 14:21:09 -04:00
utilities Fix Runkit tags not being activated when comment is added (#6767) 2020-05-15 14:27:46 +02:00
.eslintrc.js Copy to clipboard fixes including support for Android Native Bridge (#7382) 2020-04-21 10:36:49 -04:00
application.js Initial commit 2018-02-28 16:11:08 -05:00
base.js.erb [deploy] Replace (black|white)list with more inclusive language (#7459) 2020-04-27 18:00:12 +02:00
hello-dev.js Format console copy (#3888) [ci skip] 2019-09-03 15:59:12 -04:00
initializePage.js.erb [deploy] Bulk Fetch Follow Button Data for Users (#7676) 2020-05-08 13:58:58 -05:00
internal.js Initial commit 2018-02-28 16:11:08 -05:00
jquery_s3_upload.js [WIP] Add super beta video upload (#277) 2018-05-03 16:27:52 -04:00
serviceworker-companion.js Fixed some more Frontend Lint Issues (#3792) 2019-08-23 10:21:28 -04:00