diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb index eb76bb990..64161eb14 100644 --- a/app/controllers/static_controller.rb +++ b/app/controllers/static_controller.rb @@ -49,12 +49,6 @@ class StaticController < ApplicationController redirect_back fallback_location: posts_path end - def dont_fool_me - cookies[:dont_fool_me] = { value: "1", expires: 1.week } - flash[:notice] = "òwō" - redirect_back fallback_location: posts_path - end - def discord unless CurrentUser.can_discord? raise User::PrivilegeError.new("You must have an account for at least one week in order to join the Discord server.") diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 43342b58b..65109d894 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -44,58 +44,14 @@ module ApplicationHelper end def format_text(text, **options) - something_funny = options[:fool] && fool? - options = options.except(:fool) # preserve the currrent inline behaviour if options[:inline] dtext_ragel(text, **options) else - result = %(
#{dtext_ragel(text, **options)}
) - if something_funny - raw uwuify(result) - else - raw result - end + raw %(
#{dtext_ragel(text, **options)}
) end end - def fool? - return false if Danbooru.config.app_name == "e926" - return false if cookies[:dont_fool_me] - - Time.use_zone(Time.find_zone("UTC")) do - target = Date.new(2024, 4, 1) - start = target.beginning_of_day - 12.hours - stop = target.end_of_day + 6.hours - Time.now.between?(start, stop) - end - end - - FACE_CHANCE = 0.25 - FACE = [" (・`ω´・) ", " ;;w;; ", " owo ", " UwU ", " >w< ", " ^w^ "].freeze - - def uwuify(html_input) - fragment = Nokogiri::HTML5.fragment(html_input) - - fragment.traverse do |x| - if x.text? - text = x.content.tr("rlRL", "wwWW") - text = text.gsub(/(n)([aeiou])/i, '\1y\2') - text = text.gsub("ove", "uv") - text = text.gsub(/(\.+)/) do - if Random.rand < FACE_CHANCE - FACE.sample - else - $1 - end - end - x.content = text - end - end - - fragment.to_html - end - def custom_form_for(object, *args, &) options = args.extract_options! simple_form_for(object, *(args << options.merge(builder: CustomFormBuilder)), &) diff --git a/app/views/blips/partials/show/_blip.html.erb b/app/views/blips/partials/show/_blip.html.erb index d967a84bc..9ae45903a 100644 --- a/app/views/blips/partials/show/_blip.html.erb +++ b/app/views/blips/partials/show/_blip.html.erb @@ -21,7 +21,7 @@
<%= link_to "In response to blip ##{blip.response_to}", blip_path(id: blip.response_to) %>
<% end %>
- <%= format_text(blip.body, allow_color: blip.creator.is_privileged?, fool: true) %> + <%= format_text(blip.body, allow_color: blip.creator.is_privileged?) %>
<%= render "application/update_notice", record: blip %> <%= render "application/warned_notice", record: blip %> diff --git a/app/views/comments/partials/show/_comment.html.erb b/app/views/comments/partials/show/_comment.html.erb index 823430c91..537ef5137 100644 --- a/app/views/comments/partials/show/_comment.html.erb +++ b/app/views/comments/partials/show/_comment.html.erb @@ -20,7 +20,7 @@
- <%= format_text(comment.body, allow_color: comment.creator.is_privileged?, fool: true) %> + <%= format_text(comment.body, allow_color: comment.creator.is_privileged?) %>
<%= render "application/update_notice", record: comment %> <%= render "application/warned_notice", record: comment %> diff --git a/app/views/forum_posts/_forum_post.html.erb b/app/views/forum_posts/_forum_post.html.erb index 011c11283..bb1de1552 100644 --- a/app/views/forum_posts/_forum_post.html.erb +++ b/app/views/forum_posts/_forum_post.html.erb @@ -20,7 +20,7 @@
- <%= format_text(parse_embedded_tag_request_text(forum_post.body), allow_color: forum_post.creator.is_privileged?, fool: true) %> + <%= format_text(parse_embedded_tag_request_text(forum_post.body), allow_color: forum_post.creator.is_privileged?) %>
<%= render "application/update_notice", record: forum_post %> <%= render "application/warned_notice", record: forum_post %> diff --git a/app/views/static/theme.html.erb b/app/views/static/theme.html.erb index 503b65b7a..f252c29fc 100644 --- a/app/views/static/theme.html.erb +++ b/app/views/static/theme.html.erb @@ -7,13 +7,6 @@

Your device does not allow the site to save theme settings.

-<% if fool? %> -

- Click <%= link_to "here", dont_fool_me_static_path %> to kill the joke early. -

-<% end %> - -
diff --git a/config/routes.rb b/config/routes.rb index 5f93426ce..2da5b48a0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -444,7 +444,6 @@ Rails.application.routes.draw do post "/static/discord" => "static#discord", as: "discord_post" get "/static/toggle_mobile_mode" => "static#disable_mobile_mode", as: "disable_mobile_mode" get "/static/theme" => "static#theme", as: "theme" - get "/static/dont_fool_me" => "static#dont_fool_me", as: "dont_fool_me_static" get "/meta_searches/tags" => "meta_searches#tags", :as => "meta_searches_tags" root :to => "static#home"