Browse Source

Add patreon

Arlo (Hyena) 2 months ago
parent
commit
ddefe936c5
Signed by: asonix <asonix@asonix.dog> GPG Key ID: 6986797E36BFA1D4
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      app/lib/formatter.rb

+ 6
- 0
app/lib/formatter.rb View File

@@ -302,6 +302,8 @@ class Formatter
302 302
       return link_to_reddit(username)
303 303
     when 'poizen.me'
304 304
       return link_to_poizen(username)
305
+    when 'patreon.com'
306
+      return link_to_patreon(username)
305 307
     else
306 308
       return link_to_account(acct) unless linkable_accounts
307 309
     end
@@ -390,6 +392,10 @@ class Formatter
390 392
     link_to(username, "https://poizen.me/#{username}", "poizen.me")
391 393
   end
392 394
 
395
+  def link_to_patreon(username)
396
+    link_to(username, "https://www.patreon.com/#{username}", "patreon.com")
397
+  end
398
+
393 399
   def link_to(username, url, domain)
394 400
     "<span class=\"h-card\"><a href=\"#{url}\" target=\"blank\" rel=\"noopener noreferrer\" class=\"u-url mention\">@<span>#{username}@#{domain}</span></a></span>"
395 401
   end

Loading…
Cancel
Save