Sha256: 2e3ad22275c25f77ad6aeb76d7abd4c9063335cbc4f672216ad3efa66c5f8954

Contents?: true

Size: 360 Bytes

Versions: 2

Compression:

Stored size: 360 Bytes

Contents

require 'murlsh'

module Murlsh

  # Convert Ajax friendly Twitter urls (with #!) into usable urls.
  class AddPre30UnajaxTwitter < Plugin

    @hook = 'add_pre'

    TwitterAjaxRe = %r{^(https?://twitter\.com/)#!/}i

    def self.run(url, config)
      url.url.sub!(TwitterAjaxRe, '\1')
      url.via.sub!(TwitterAjaxRe, '\1')  if url.via
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
murlsh-1.4.1 plugins/add_pre_30_unajax_twitter.rb
murlsh-1.4.0 plugins/add_pre_30_unajax_twitter.rb