docbrown/app/assets/javascripts/utilities
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
..
browserStoreCache.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
buildArticleHTML.js.erb Hotfix video icon in feed (#7792) 2020-05-13 09:40:39 -04:00
buildCommentFormHTML.js.erb [deploy] Add a more helpful msg for response templates (#7543) 2020-04-27 13:28:28 -04:00
buildCommentHTML.js.erb Removal of morrrre hardcoded dev.to links (#7390) 2020-04-21 11:50:18 +02:00
checkUserLoggedIn.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
dynamicallyLoadScript.js Fix Runkit tags not being activated when comment is added (#6767) 2020-05-15 14:27:46 +02:00
getCsrfToken.js.erb Replace Airbrake with Honeybadger (#5007) [deploy] 2019-12-05 11:29:51 -06:00
getCurrentPage.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
getImageForLink.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
insertAfter.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
localDateTime.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
localStorageTest.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
preventDefaultAction.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
sendFetch.js Hide a blocked user's content [deploy] (#4678) 2019-11-04 14:47:26 -05:00
sendHapticMessage.js Fixed some lint issues (#3782) 2019-08-21 10:44:23 -04:00
showModal.js Fixed some lint issues (#3782) 2019-08-21 10:44:23 -04:00
slideSidebar.js Fixed some lint issues (#3782) 2019-08-21 10:44:23 -04:00
timeAgo.js [deploy] Made changes to timeAgo function for Preact component usage. (#6083) 2020-02-17 10:04:38 -05:00
userData.js Refactored userData while working on hompage makeover. (#5916) [deploy] 2020-02-06 11:18:52 -08:00