zamaro

status

Jan 9th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. <script type="text/javascript">
  2. (function($) {
  3. var amount = '6';
  4. if (location.href.indexOf('/site') < 1 && location.href.indexOf('/search/?c=5') < 1) {
  5. $('#main').before('<div id="sidebar" style="right: 0; left:62% top:55%; padding: 300px; width: 200px; position: absolute"><div id="portal"><div id="latest" class="portal_box"><h2>Latest Posts</h2></div><div></div>');
  6. $('#main').addClass('margin');
  7.  
  8. $.get(main_url + 'search/?c=5', function(data) {
  9. $('tr[class*="row"]:lt(' + amount + ')', data).each(function() {
  10. $(this).find('td.c_cat-title > a, td.c_cat-lastpost a, td.c_cat-replies a').appendTo('#latest');
  11. $.get(location.href);
  12. });
  13.  
  14. $('#latest a[href*="/topic"]').wrap('<h4 />');
  15. $('#latest a[rel]').each(function() {
  16. $(this).next('a[href*="/profile"]').andSelf().wrapAll('<div class="portal_content" />');
  17. var next = $(this).next('a[href*="/profile"]')
  18. $(this).insertAfter(next).before('<br />Replies: ');
  19. });
  20. });
  21. }
  22. })(jQuery);
  23. </script>
  24. <script type="text/javascript">
  25. if (location.href.indexOf('/index') !== -1) {
  26. if ($('div.cat_wrap').length) {
  27. $('#sidebar').insertBefore('div.cat_wrap:eq(1)');
  28. } else {
  29. $('#sidebar').insertBefore('div.category:eq(1)');
  30. }
  31. $('#main').addClass('index');
  32. $('#sidebar').nextAll().wrapAll('<div class="margin" />');
  33. }
  34. </script>
Advertisement
Add Comment
Please, Sign In to add comment