Skip to content

Instantly share code, notes, and snippets.

@webharvy
Created November 18, 2019 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webharvy/ad17d2da5d657a688416e3cd56a517cf to your computer and use it in GitHub Desktop.
Save webharvy/ad17d2da5d657a688416e3cd56a517cf to your computer and use it in GitHub Desktop.
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