Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function show(e) {
- let link = $(e.target),
- numb = link.text().substr(2),
- post = $(`#reply${numb}`) || null;
- if (node(post)) {
- if( beyond(node(post)) ) {
- let _embed = node(post).cloneNode(true);
- each(_embed.children, item => {
- if (item.classList.contains(popup)) item.remove();
- });
- popup($(_embed), link);
- } else {
- highlightOnLinkEnter(post, link);
- }
- }else{
- let thisBoard = document.querySelector('input[name*="board"]').value;
- $.get((`/${thisBoard}/inc/fetch.php?post=${numb}&board=${thisBoard}`)
- .success( data => popup($(data), link) )
- .error( () =>
- popup($(`<div style="background: #000; color: #F0F; font-weight: bold; border: 2px dashed #F0F">Error loading >>${numb}</div>`)),link));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement