Permalink
Browse files

Create follow-rel-next.js

  • Loading branch information...
richardscarrott committed Oct 18, 2018
1 parent e6583d1 commit 061caa10ea899c9d5d196104c29410847970b17b
Showing with 14 additions and 0 deletions.
  1. +14 −0 snippets/follow-rel-next.js
@@ -0,0 +1,14 @@
function goTo(url) {
window.location.href = url;
}
function goToNext() {
const nextLink = $('link[rel=next]');
if (!nextLink) {
console.warn('Next link not found');
return;
}
goTo(nextLink.href);
}
goToNext();

0 comments on commit 061caa1

Please sign in to comment.