ScottoCat
Member-
Posts
21 -
Joined
-
Last visited
Content Type
Forums
Gallery
Blogs
Events
Store
Downloads
Profiles
Everything posted by ScottoCat
-
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>
-
- scrolling
- code-injection
-
(and 1 more)
Tagged with:
-
Add pagination arrows to the top of post page
ScottoCat replied to ScottoCat's topic in Customize with code
Hello, Yes, thank you, Here is the link to that page. https://top1000albums.com/newer-albums- 3 replies
-
- javascript
- navigation
-
(and 1 more)
Tagged with:
-
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.
- 3 replies
-
- javascript
- navigation
-
(and 1 more)
Tagged with:
-
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>
-
Page Returning to Where it was after back arrow
ScottoCat replied to ScottoCat's topic in Customize with code
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> -
Page Returning to Where it was after back arrow
ScottoCat replied to ScottoCat's topic in Customize with code
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 -
Page Returning to Where it was after back arrow
ScottoCat replied to ScottoCat's topic in Customize with code
it is public. Anyone can go to it. Are you saying that you would need access to the backend? -
Page Returning to Where it was after back arrow
ScottoCat replied to ScottoCat's topic in Customize with code
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 -
Page Returning to Where it was after back arrow
ScottoCat replied to ScottoCat's topic in Customize with code
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 -
Page Returning to Where it was after back arrow
ScottoCat replied to ScottoCat's topic in Customize with code
-
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.
-
Never-mind. I figured it out using Spacers
-
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
-
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.
-
My site has a lot of scrolling. The template Avenue returned you to where you were on the page. I switched to Brine template to have more control on the post. But I found out this annoying thing where back arrows bring you to the top of the page. I can imaging this will get old to the users experience. I am about to inject the code above but am uncertain as to which section. Also i am nervous that I will break my site. If something bad happens can I simply go in and remove it?