Sha256: 8f0a2bfdb1269429188dc8789dd318fd03a6d16524056c646c8309ce1f89e89e

Contents?: true

Size: 317 Bytes

Versions: 10

Compression:

Stored size: 317 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

10 entries across 10 versions & 1 rubygems

Version Path
thredded-0.12.1 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.12.0 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.11.1 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.11.0 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.10.1 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.10.0 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.9.4 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.9.3 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.9.2 lib/thredded/html_pipeline/wrap_iframes_filter.rb
thredded-0.9.1 lib/thredded/html_pipeline/wrap_iframes_filter.rb