Sha256: 5994b33bbc9f4fafdf3e8e9badb06d56728bb60d2f6ded113a00d24bef05828a

Contents?: true

Size: 609 Bytes

Versions: 1

Compression:

Stored size: 609 Bytes

Contents

# frozen_string_literal: true

module Sidekiq
  module Throttled
    module Web
      module SummaryFix
        JAVASCRIPT = <<-JAVASCRIPT
        <script>
          $(function ($el) {
            var $el = $(".summary li.enqueued > a"),
                url = $el.attr("href").replace(/\/queues$/, "/enhanced-queues");
            $el.attr("href", url);
          });
        </script>
        JAVASCRIPT

        class << self
          attr_accessor :enabled
        end

        def display_custom_head
          SummaryFix.enabled ? "#{super}#{JAVASCRIPT}" : super
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sidekiq-throttled-0.7.1 lib/sidekiq/throttled/web/summary_fix.rb