Sha256: 23aaeb101a3f6c9aaa7043d934278e74d8fbfe2db45be8d5dd32864d7320abbb

Contents?: true

Size: 318 Bytes

Versions: 42

Compression:

Stored size: 318 Bytes

Contents

# frozen_string_literal: true

module Thredded
  module HtmlPipeline
    # Wraps iframes with a <div class="thredded--embed-16-by-9"/>
    class WrapIframesFilter < ::HTML::Pipeline::Filter
      def call
        doc.css('iframe').wrap('<div class="thredded--embed-16-by-9"/>')
        doc
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 2 rubygems

Version Path
thredded-0.15.4 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.15.3 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.15.2 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.15.1 lib/thredded/html_pipeline/wrap_iframes_filter.rb
threddedDANIEL-0.14.5 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.14.4 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.14.3 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.14.2 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.14.1 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.14.0 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.13.8 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.13.7 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.13.6 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.13.5 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.13.4 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.13.3 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.13.2 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.13.1 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.13.0 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.12.4 lib/thredded/html_pipeline/wrap_iframes_filter.rb