Jump to content

ScottoCat

Member
  • Posts

    21
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ScottoCat's Achievements

  1. Hello, Once again script has stopped working on my site. It is one of the most important features. I guess every time they do an update? Because there is a lot of scrolling with many individual posts I need the user to return to where they were on the posts page when they click the back arrow. I found script that works BUT only after the 2nd click back. I need it to happen every time. Is there a way to alter this or does anyone have script that would work.? Thanks! Here It is: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script type="text/javascript"> if (window.performance && window.performance.navigation.type === window.performance.navigation.TYPE_BACK_FORWARD) { if (localStorage.getItem("my_app_name_here-quote-scroll") != null) { $(window).scrollTop(localStorage.getItem("my_app_name_here-quote-scroll")); } } else { $(window).scrollTop(); } window.addEventListener('beforeunload', function (e) { if (window.performance && window.performance.navigation.type === window.performance.navigation.TYPE_BACK_FORWARD) { localStorage.setItem("my_app_name_here-quote-scroll", $(window).scrollTop()); } }); </script>
  2. Hello, Yes, thank you, Here is the link to that page. https://top1000albums.com/newer-albums
  3. Hello, If you go to my site head over to Newer Albums. The pagination arrows are only at the bottom. I would like to have them at the top as well. Does anyone know code that I could add to the post pages settings header. I would like it to be just under the search bar. The second picture shows the current pagination, which I would like to keep.
  4. I am having a similar issue except it goes to the top of the page. The JS i had in the code injector stopped working after working for 4 + years. Does anyone now how to fix this. Here is the current code that isn't working: <script type="text/javascript"> function refreshPage () { var page_y = document.getElementsByTagName("body")[0].scrollTop; window.location.href = window.location.href.split('?')[0] + '?page_y=' + page_y; } window.onload = function () { setTimeout(refreshPage, 3600000); if ( window.location.href.indexOf('page_y') != -1 ) { var match = window.location.href.split('?')[1].split("&")[0].split("="); document.getElementsByTagName("body")[0].scrollTop = match[1]; } } </script>
  5. I had to upgrade my plan to be able to unlock the code injector. Now I just need code that will do what it did before. Here is the code now that I can copy/paste: <script type="text/javascript"> function refreshPage () { var page_y = document.getElementsByTagName("body")[0].scrollTop; window.location.href = window.location.href.split('?')[0] + '?page_y=' + page_y; } window.onload = function () { setTimeout(refreshPage, 3600000); if ( window.location.href.indexOf('page_y') != -1 ) { var match = window.location.href.split('?')[1].split("&")[0].split("="); document.getElementsByTagName("body")[0].scrollTop = match[1]; } } </script>
  6. Does that script need to be altered or do I add another. I went to developer section and was not able to copy where the JS was added in the footer code injection part. It looks like i have to upgrade to be able to unlock that section
  7. it is public. Anyone can go to it. Are you saying that you would need access to the backend?
  8. Hey Creedon, thanks. Here is a page: https://top1000albums.com/300s If you scroll down to the middle or lower click on any album, then hit the back arrow and you will see what I mean. I'll look into getting the site wide password
  9. Thanks for the response Simon, What i had set up was script that would allow you to return to your place on these busy pages you were after going to an album (post). Soon i will have 1100 pages on the site. This script was working up until today
  10. Here is the script now: Sorry, it wouldn't allow copy.paste
  11. Hello, I have had code that has worked for years where when you hit the back arrow you return to where you were on the scroll. It's important with my site, especially on mobile. The back arrow is returning you to the top of the page rather than where you left off. I remember i got code to insert. I am also not sure why it suddenly stopped working.
  12. Never-mind. I figured it out using Spacers
  13. Hello, I am trying to make bullet list 2 columns on desktop and single file left on mobile. I was able to do it by dragging but it looked bad and was out of order on mobile
  14. Hey All, Does anyone know if it is possible to increase the max posts per blog page. It is a 20 post limit now. I am hoping to get it to 33 or something. I will soon have around 120 posts and prefer to not have too many 'Older' 'Newer' pages.
  15. This one worked great. I land at the top of each post and don't loose the spot on scrolls. This was especially important on smartphones. One question; can Ajax be enabled with this script. I am afraid to try it.
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.