K, now everything is clear to me. I just didn't understand if you requested a feature, ask for a solution explaining it with some kind of a pseudo code, and I thought you ask for something way different that you had on your mind.
What you ask for can be quite easily achieved in at least two ways, with or without using javascript. All depends on theme you use.
The most important thing is the pagebreak string you need to change.
Edit /kernel/boot/variables php and find the variable responsible for pagebreak
define('PAGE_BREAK', '<!-- pagebreak -->');
To ease up things I'd try with '<a id="pagebreak"><!-- pagebreak --></a>' as 'name' attribute in anchors is obsolete, and would make life harder.
Don't forget to edit and resave already created articles. Pagebreak code won't change magically inside existing articles.
Then you have two choices to let the visitor continue reading the full article with new pagebreak code.
1. Find the loop code in your theme responsible for listing the articles intros. Edit its "read more" url code and add a #pagebreak string at the end of url.
This will position window view automatically on page load at the place where new pagebreak code lies.
You can try to visit an example page on your blog by pasting url to it and addint #pagebreak at the end of url.
2. add a proper javascript code that will scroll page to the place where pagebreak is placed. As I had a bit of time, I prepared ready to use snippet. Try to paste it at the bottom of your theme before </body></html> elements and if possible above other scripts if such exist.
Code: Select all
<script>
window.onload = function(){
var element = document.querySelector('#pagebreak');
element.scrollIntoView({ behavior: 'smooth' });
};
</script>