Sha256: 78ec9852c4c1be26b87236c381141b7d7bc5af2431857eff846b7b0a83d18451
Contents?: true
Size: 513 Bytes
Versions: 7
Compression:
Stored size: 513 Bytes
Contents
module Murlsh # Append some content types to title to warn the user that they will launch # an external application. class AddPre65ContentTypeWarn < Plugin @hook = 'add_pre' def self.run(url, config) content_type_display = case url.content_type when 'application/ogg'; 'OGG' when 'application/pdf'; 'PDF' when 'audio/mpeg'; 'MP3' when 'audio/ogg'; 'OGG' end url.title << " (#{content_type_display})" if content_type_display end end end
Version data entries
7 entries across 7 versions & 1 rubygems