Advertisement
Guest User

redirect fixed

a guest
Apr 25th, 2025
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. (function() {
  2. 'use strict';
  3.  
  4. document.addEventListener('DOMContentLoaded', function() {
  5. const boardlist = document.querySelector('.boardlist');
  6.  
  7. if (boardlist) {
  8. boardlist.addEventListener('click', function(event) {
  9. if (event.target.matches('a')) {
  10. return;
  11. }
  12.  
  13. let redirectUrl = 'https://ziemniachan.org';
  14.  
  15. // Check if we're on the mod page
  16. if (window.location.pathname.startsWith('/mod.php')) {
  17. redirectUrl += '/mod.php?/b/index.html';
  18. } else {
  19. redirectUrl += '/b/index.html';
  20. }
  21.  
  22. window.location.href = redirectUrl;
  23. });
  24. }
  25. });
  26. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement