From 56f5841d4b9c12296cdfcaeff174b2627d59afc8 Mon Sep 17 00:00:00 2001
From: Star Rauchenberger <fefferburbia@gmail.com>
Date: Sat, 7 Dec 2024 11:49:49 -0500
Subject: Migrate to full rails app

---
 app/assets/javascripts/application.js               | 14 ++++++++++++++
 app/assets/javascripts/pokemon.js.coffee            | 19 +++++++++++++++++++
 app/assets/javascripts/pokeviewer/application.js    | 14 --------------
 app/assets/javascripts/pokeviewer/pokemon.js.coffee | 19 -------------------
 4 files changed, 33 insertions(+), 33 deletions(-)
 create mode 100644 app/assets/javascripts/application.js
 create mode 100644 app/assets/javascripts/pokemon.js.coffee
 delete mode 100644 app/assets/javascripts/pokeviewer/application.js
 delete mode 100644 app/assets/javascripts/pokeviewer/pokemon.js.coffee

(limited to 'app/assets/javascripts')

diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
new file mode 100644
index 0000000..52d2214
--- /dev/null
+++ b/app/assets/javascripts/application.js
@@ -0,0 +1,14 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// compiled file. JavaScript code in this file should be added after the last require_* statement.
+//
+// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
+// about supported directives.
+//
+//= require jquery3
+//= require_tree .
diff --git a/app/assets/javascripts/pokemon.js.coffee b/app/assets/javascripts/pokemon.js.coffee
new file mode 100644
index 0000000..e80ae77
--- /dev/null
+++ b/app/assets/javascripts/pokemon.js.coffee
@@ -0,0 +1,19 @@
+show_pokemon_tab = (tab) ->
+  $(".pokemon-tab").hide()
+  $(".ptabe-button").removeClass("active")
+  $(".pokemon-" + tab).show()
+  $(".ptabe-" + tab).addClass("active")
+
+$ ->
+  $(".pkv-has-hover").mouseover ->
+    $(this).children(".pkv-hover").show()
+  $(".pkv-has-hover").mouseout ->
+    $(this).children(".pkv-hover").hide()
+  $(".pkv-has-hover").mousemove (event) ->
+    $(this).children(".pkv-hover").offset({left: event.pageX + 16, top: event.pageY - 16})
+  $(".in-emerald .pokemon-image img").mouseover ->
+    $(this).attr("src", $(this)[0].src)
+  $(".ptabe-button a").click ->
+    show_pokemon_tab($(this).data("tab"))
+  if $("#pokemon-embed").length > 0
+    show_pokemon_tab("details")
diff --git a/app/assets/javascripts/pokeviewer/application.js b/app/assets/javascripts/pokeviewer/application.js
deleted file mode 100644
index 52d2214..0000000
--- a/app/assets/javascripts/pokeviewer/application.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// This is a manifest file that'll be compiled into application.js, which will include all the files
-// listed below.
-//
-// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
-// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
-//
-// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
-// compiled file. JavaScript code in this file should be added after the last require_* statement.
-//
-// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
-// about supported directives.
-//
-//= require jquery3
-//= require_tree .
diff --git a/app/assets/javascripts/pokeviewer/pokemon.js.coffee b/app/assets/javascripts/pokeviewer/pokemon.js.coffee
deleted file mode 100644
index e80ae77..0000000
--- a/app/assets/javascripts/pokeviewer/pokemon.js.coffee
+++ /dev/null
@@ -1,19 +0,0 @@
-show_pokemon_tab = (tab) ->
-  $(".pokemon-tab").hide()
-  $(".ptabe-button").removeClass("active")
-  $(".pokemon-" + tab).show()
-  $(".ptabe-" + tab).addClass("active")
-
-$ ->
-  $(".pkv-has-hover").mouseover ->
-    $(this).children(".pkv-hover").show()
-  $(".pkv-has-hover").mouseout ->
-    $(this).children(".pkv-hover").hide()
-  $(".pkv-has-hover").mousemove (event) ->
-    $(this).children(".pkv-hover").offset({left: event.pageX + 16, top: event.pageY - 16})
-  $(".in-emerald .pokemon-image img").mouseover ->
-    $(this).attr("src", $(this)[0].src)
-  $(".ptabe-button a").click ->
-    show_pokemon_tab($(this).data("tab"))
-  if $("#pokemon-embed").length > 0
-    show_pokemon_tab("details")
-- 
cgit 1.4.1