tuff_ghost: (Default)
[personal profile] tuff_ghost posting in [community profile] ao3some
If your userscript @requires jQuery, and your users are on Firefox, it's going to break JS running on Ao3 since the latest deploy, particularly the JS which shows modal boxes and hides the Share code on works.

If you're like me you were @requiring jQuery because you wanted your script to run in Chrome on Tampermonkey (where your script is sandboxed away from the host jQuery instance), and you didn't want to maintain two different copies of your script for Greasemonkey and Tampermonkey.

So, @require jQuery breaks stuff in Firefox, but you still need jQuery in Chrome. The solution is to get your jQuery instance from unsafeWindow.jQuery - this will point to the host instance of jQuery.


(function($) {
// your code which uses jQuery normally as $
})(unsafeWindow.jQuery);

Date: 2013-04-04 10:40 pm (UTC)
jjhunter: closeup of jjhunter's blue skinned Glitch in flight (glitch jj 2)
From: [personal profile] jjhunter
From your keyboard to admin's ear!

Date: 2013-04-04 11:21 pm (UTC)
jjhunter: The shorthand declares the function `cs50`, i.e. the cs class, takes input type `student` and returns output type 'god' (cs50)
From: [personal profile] jjhunter
Well, as one of the people who has been *plagued* by wacky navigation display issues using the site on Firefox since the most recent site deploy, you have my deep & abiding thanks.

June 2021

S M T W T F S
  12345
6789101112
1314 1516171819
20212223242526
27282930   

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 22nd, 2025 09:25 pm
Powered by Dreamwidth Studios