Downgrade jQuery on homepage to be the same version as everywhere else

I noticed an issue where Turbo-loading between the Your Items page and
the homepage would clobber each other's copy of jQuery, breaking things
sometimes. e.g. go to Your Items, then go to home, then go to Your
Items, and the page's JS fails because `$.fn.live` isn't defined.

I briefly tested the homepage and it didn't seem to actually depend on
any features from the later version of jQuery? At least not that I
noticed! So I'll just downgrade for consistency. (I also tried
upgrading the Your Items page, but there's too much usage of
`$.fn.live`, which is replaced with a notably different syntax in
jQuery 2.0+.)
This commit is contained in:
Emi Matchu 2024-03-13 21:38:45 -07:00
parent c011e99819
commit c3eab22b4e
2 changed files with 1 additions and 2 deletions

View file

@ -108,7 +108,6 @@ module ApplicationHelper
JAVASCRIPT_LIBRARIES = { JAVASCRIPT_LIBRARIES = {
:jquery => 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js', :jquery => 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js',
:jquery20 => 'https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js',
:jquery_tmpl => 'https://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js', :jquery_tmpl => 'https://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js',
} }

View file

@ -123,7 +123,7 @@
= t '.preview.pet_not_found' = t '.preview.pet_not_found'
- content_for :javascripts do - content_for :javascripts do
= include_javascript_libraries :jquery20, :jquery_tmpl = include_javascript_libraries :jquery, :jquery_tmpl
= javascript_include_tag 'ajax_auth', 'lib/jquery.timeago', defer: true = javascript_include_tag 'ajax_auth', 'lib/jquery.timeago', defer: true
- content_for :javascripts_body do - content_for :javascripts_body do