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-1.1.0 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-1.0.1 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-1.0.0 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.16 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.15 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.14 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.13 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.12 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.11 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.10 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.9 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.8 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.7 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.6 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.5 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.4 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.3 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.1 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.16.0 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.15.5 lib/thredded/html_pipeline/wrap_iframes_filter.rb