Skip to content

Instantly share code, notes, and snippets.

@webharvy
Created Nov 18, 2019
Embed
What would you like to do?
Google Jobs : codes for pagination / collating
// Code for pagination (scroll)
els = document.getElementsByTagName("ul");
el = els[els.length-1];
el.children[el.childElementCount-1].scrollIntoView();
// Code for collating listings
groups = document.getElementsByTagName("ul");
parent = groups[0];
for (var i = groups.length - 1; i >= 1; i--) {
var children = groups[i].children;
for (var j = children.length - 1; j >= 0; j--) {
parent.appendChild(children[j]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment