diff --git a/app/assets/images/furecs/furecs-screenshot.png b/app/assets/images/furecs/furecs-screenshot.png new file mode 100644 index 00000000..304d76ac Binary files /dev/null and b/app/assets/images/furecs/furecs-screenshot.png differ diff --git a/app/controllers/domain/fa/api_controller.rb b/app/controllers/domain/fa/api_controller.rb index 96106a8e..bcaa335f 100644 --- a/app/controllers/domain/fa/api_controller.rb +++ b/app/controllers/domain/fa/api_controller.rb @@ -4,10 +4,10 @@ class Domain::Fa::ApiController < ApplicationController before_action :validate_api_token! skip_before_action :verify_authenticity_token, - only: %i[enqueue_objects object_statuses] + only: %i[enqueue_objects object_statuses similar_users] skip_before_action :validate_api_token!, - only: %i[search_user_names object_statuses] + only: %i[search_user_names object_statuses similar_users] def search_user_names name = params[:name] diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index edcee4ce..737bfabf 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -1,8 +1,12 @@ # typed: true class PagesController < ApplicationController - skip_before_action :authenticate_user!, only: [:root] + skip_before_action :authenticate_user!, only: %i[root user_script] def root render :root end + + def user_script + render :user_script + end end diff --git a/app/controllers/user_scripts_controller.rb b/app/controllers/user_scripts_controller.rb index ad14dc99..e915cf3d 100644 --- a/app/controllers/user_scripts_controller.rb +++ b/app/controllers/user_scripts_controller.rb @@ -1,6 +1,7 @@ # typed: true class UserScriptsController < ApplicationController skip_before_action :authenticate_user!, only: [:get] + skip_before_action :verify_authenticity_token, only: [:get] ALLOWED_SCRIPTS = %w[object_statuses.user.js furecs.user.js].freeze diff --git a/app/views/pages/root.html.erb b/app/views/pages/root.html.erb index 53983a3d..1c42a31d 100644 --- a/app/views/pages/root.html.erb +++ b/app/views/pages/root.html.erb @@ -14,12 +14,18 @@ <%= link_to "Telegram", "https://t.me/DeltaNoises", target: "_blank", - class: "sky-link" %> + class: "blue-link" %> - <%= link_to "BlueSky", "https://bsky.app/profile/delta.refurrer.com", target: "_blank", - class: "sky-link" %> + class: "blue-link" %> + +
+ The FurAffinity User Recommender is a user script that helps you discover artists and users similar to ones you already enjoy on FurAffinity. +
++ 1. First, install a userscript manager like + <%= link_to "https://www.tampermonkey.net/", target: "_blank", class: "blue-link" do %> + Tampermonkey + <% end %> + or + <%= link_to "https://violentmonkey.github.io/", target: "_blank", class: "blue-link" do %> + Violentmonkey + <% end %>. +
++ 2. Then, <%= link_to "click here", "https://refurrer.com/us/furecs.user.js", class: "blue-link" %> to install the script. +
+Screenshot of the Similar Users section added to a user profile page:
+ <%= image_tag "furecs/furecs-screenshot.png", alt: "Screenshot showing the Similar Users section added by the script", class: "rounded-lg border border-slate-300 shadow-lg" %> ++ Just like how Twitter's "Who to Follow" or Amazon's "Customers Also Bought" features work, this recommender uses patterns in user behavior to make suggestions. For FurAffinity, this is based on who follows who. +
++ Think of it like this: if many people who follow your favorite artist also follow another artist, there's a good chance you'll enjoy that other artist's work too! +
++ The recommendations are based on a snapshot of FurAffinity follow lists that is periodically updated. The current model was last updated on January 10, 2025. This means that very recent changes to who follows who might not be reflected in the recommendations yet. +
++ For support or suggestions, contact @DeltaNoises on + <%= link_to "Telegram", "https://t.me/DeltaNoises", target: "_blank", class: "blue-link" %>. +
+