diff --git a/Gemfile.lock b/Gemfile.lock index bccbc76d..cdc4ee29 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -115,7 +115,7 @@ GEM blacklight (>= 7.18, < 9) deprecation rails (>= 6.1, < 7.3) - blacklight-oembed (1.4.0) + blacklight-oembed (1.4.1) blacklight (>= 7.25, < 9) rails ruby-oembed diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index 83877312..4057577f 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -17,3 +17,4 @@ //= link blacklight-gallery/masonry.js //= link blacklight-gallery/slideshow.js //= link blacklight-hierarchy/app/assets/javascripts/blacklight/hierarchy/hierarchy.js +//= link blacklight-oembed/oembed.js diff --git a/app/assets/javascripts/blacklight_oembed.js b/app/assets/javascripts/blacklight_oembed.js deleted file mode 100644 index 72acb3e2..00000000 --- a/app/assets/javascripts/blacklight_oembed.js +++ /dev/null @@ -1,5 +0,0 @@ -//= require 'blacklight_oembed/jquery.oembed.js' - -Blacklight.onLoad(function() { - $('[data-embed-url]').oEmbed(); -}); \ No newline at end of file diff --git a/app/javascript/entry.js b/app/javascript/entry.js index 4442964b..0c1e6c63 100644 --- a/app/javascript/entry.js +++ b/app/javascript/entry.js @@ -20,3 +20,9 @@ export const i18n = new I18n() import 'transform_result' import 'blacklight-hierarchy' +import 'openseadragon-rails' + +import oembed from 'blacklight-oembed/oembed' +Blacklight.onLoad(function() { + oembed(document.querySelectorAll('[data-embed-url]')); +});