Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type='text/javascript'>
- /*<![CDATA[*/
- var postBody = document.querySelector('.amp-content'),
- PostPages = postBody.innerHTML.split('<><>'),
- currPage = 1,
- Pagin = new String();
- document.querySelector('.post-outer').classList.add('divided-post');
- location.search.replace('?','').split('&').forEach(function(par){
- if(par.split('=')[0]==='page'){ currPage=parseInt(par.split('=')[1]); }
- });
- postBody.innerHTML = PostPages[currPage-1];
- if( (currPage) !== PostPages.length ){ Pagin += '<a class="next-page" href="?page='+ (currPage+1) +'" data-trans="2">التالي</a>';}
- if( currPage !== 1 ){ Pagin += '<a class="prev-page" href="?page='+ (currPage-1) +'" data-trans="3">السابق</a>'}
- document.querySelector('.post-pages').innerHTML = Pagin;
- /*]]>*/
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement