Guest User

Вот так это выглядит

a guest
Jul 6th, 2018
109
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function show(e) {
  2.  
  3. let link = $(e.target),
  4. numb = link.text().substr(2),
  5. post = $(`#reply${numb}`) || null;
  6.  
  7. if (node(post)) {
  8. if( beyond(node(post)) ) {
  9. let _embed = node(post).cloneNode(true);
  10.  
  11. each(_embed.children, item => {
  12. if (item.classList.contains(popup)) item.remove();
  13.  
  14. });
  15.  
  16. popup($(_embed), link);
  17. } else {
  18. highlightOnLinkEnter(post, link);
  19. }
  20. }else{
  21. let thisBoard = document.querySelector('input[name*="board"]').value;
  22.  
  23. $.get((`/${thisBoard}/inc/fetch.php?post=${numb}&board=${thisBoard}`)
  24. .success( data => popup($(data), link) )
  25. .error( () =>
  26. popup($(`<div style="background: #000; color: #F0F; font-weight: bold; border: 2px dashed #F0F">Error loading >>${numb}</div>`)),link));
  27. }
  28. }
RAW Paste Data