Advertisement
Guest User

Untitled

a guest
Feb 12th, 2024
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. var fondo = document.body.querySelector("#thread-interactions");
  2. let board = !fondo;
  3. if (board) {
  4. //pagina board
  5. fondo = document.createElement("div");
  6. document.body.querySelector('form[name="postcontrols"]').append(fondo);
  7. }
  8.  
  9. fondo.classList.add("fondo-flex");
  10. fondo.style.display = "flex";
  11. fondo.style.justifyContent = "space-between";
  12. fondo.style.alignItems = "center";
  13. fondo.style.margin = "0px";
  14.  
  15. let fondoEnd = document.createElement("div");
  16. fondoEnd.classList.add("fondo-end-flex");
  17. fondoEnd.style.display = "flex";
  18. fondoEnd.style.flexDirection = "column";
  19. fondoEnd.style.alignItems = "end";
  20.  
  21.  
  22. let qab = document.body.querySelector(".quick_actions_bottom");
  23.  
  24. let pmf = document.body.querySelector("#post-moderation-fields");
  25. pmf.style.float = "none !important";
  26. pmf.style.textAlign = "left";
  27. pmf.querySelector("#report-fields").style.textAlign = "right";
  28.  
  29.  
  30. let bqr = document.body.querySelector(".bottom-quick-reply");
  31.  
  32.  
  33. // rimuove ricerca fine pagina
  34. if (board) {
  35. let srcForm = qab.querySelector("form");
  36. if (srcForm) srcForm.remove();
  37. }
  38. // spostare quick_actions_bottom, .bottom-quick-reply e post-moderation-fields alla fine di form-controls
  39. fondo.append(qab);
  40. if (bqr) fondo.append(bqr);
  41. fondo.append(pmf);
  42.  
  43. fondo.append(qab);
  44. if (bqr) fondo.append(bqr);
  45. fondoEnd.append(pmf);
  46.  
  47. if (!board) {
  48. //thread stats da spostare alla fine di form postcontrols altrimenti footer non รจ centrato
  49. let ts = document.body.querySelector("#thread_stats");
  50. ts.style.marginRight = "0px";
  51. fondoEnd.append(ts)
  52. }
  53.  
  54. fondo.append(fondoEnd);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement