Sha256: 88aa35bf6ac6522f1eac49f7653957fab60c5f01155d444c5b493b86d9ae8789
Contents?: true
Size: 516 Bytes
Versions: 10
Compression:
Stored size: 516 Bytes
Contents
module Murlsh # Shortcuts for user-specified thumbnail urls. # # These keys can be passed in as the 'thumbnail' parameter when adding a url # and they will be converted to the corresponding url. class AddPre40ThumbnailShortcuts < Plugin @hook = 'add_pre' Shortcuts = { # 'trollin' => 'http://imagehost.com/trollface.jpg', } def self.run(url, config) if Shortcuts.key?(url.thumbnail_url) url.thumbnail_url = Shortcuts[url.thumbnail_url] end end end end
Version data entries
10 entries across 10 versions & 1 rubygems