ALL POSTSCustomizing Back to Top Button
<p>Hi.
I tried customizing the Back to Top Button here, using MediaWiki:BackToTopButton.css, but it didn't work. I put the code in Wikia.css, and it didn't work too.
</p>
(Edited by Remarkablefan)
<p>You're using the old version, not the modern version, you need to set
window.BackToTopModern = true; in your wiki's JS for it to show the modern button, which then your CSS will affect, also, unless you import MediaWiki:BackToTopButton.css it won't affect anything, so you can delete it and just keep the CSS you already have in your Wikia.css.
</p>
(Edited by Sophiedp)
It is in the MediaWiki:Common.js. Should I put it somewhere else?
(Edited by Remarkablefan)
<p>Oh, yeah, its fine in the Common.js, in that case the CSS should affect the button once the JS is reviewed by Fandom staff.
</p>
(Edited by Sophiedp)
<p>Actually it was there before I put the CSS, but it had no effect... I put it in wikia.js and submitted the edit to be reviewed.. I wanted to see if anything would change but the test mode doesn't work ("Something went wrong. Please try again later.
").... Now how to fix that T-T
</p>
(Edited by Remarkablefan)
I tested it... The image doesn't show up..
(Edited by Remarkablefan)
<p>Yeah, I don't know why its not applying the background CSS, considering its applying the other CSS rule to hide the svg, but I'll ask and see if I can find out why. Also, you don't need to have the JS in both your Common.js and Wikia.js, so you can remove your Wikia.js if you want.
</p>
(Edited by Sophiedp)
<p>After speaking with fng, it turns out you put the JS config for SpoilerAlert in your Wikia.css, could you try removing that and then wait 15 minutes for cache and then refresh the page?
</p>
(Edited by Sophiedp)
<p>I actually was planning to remove the spoiler alert thing completely.
</p><p>Also, can I keep the code in wikia.js instead of common.js? I was advised before to use wikia.css but not common.css... I thought I should apply this to the js too, idk. I think the comoon.js isn't working anyway (just as common.css used not to), bcz the modernized BTT button code was there for a while (before I activate the button with the ImportJS code), and yet it didn't work.
</p><p>Okay, I removed the spoiler alert, refreshed the page, and it's working! Thank you very much.
Even entering test mode from my PC problem is solved.
</p>
(Edited by Remarkablefan)
<p>As long as it works, I guess its fine to leave there.
</p><p>np~
</p>
(Edited by Sophiedp)