2A News

New Hampshire Lawmakers Support Campus Carry After Brown Attack

Reading Time: 1:53 min

Violent criminals choose “soft targets” for a reason. With an unarmed populace, there is far less of a chance that a good guy with a gun will step up and…

View post

Missouri Man Walks Free After Intervening in Alleged Domestic Abuse Incident

Reading Time: 2:7 min

There is great news today for a Missouri man who courageously intervened in a frightening domestic abuse incident at a Jefferson City shopping center in November. After interviewing several witnesses…

View post

Senate Anti-Gunners Seek to Close Background Check ‘Loophole’

Reading Time: 1:58 min

Protection of the Second Amendment would not be on the front burner as much as it is if not for the constant threat from those who would neuter it.  Take…

View post

DOJ Counters NRA Lawsuit Over NFA Registration Requirement

Reading Time: 1:54 min

Despite the decidedly positive developments at the Department of Justice (DOJ) concerning gun rights this year, there remains work to be done in the fight for the Second Amendment. An…

View post

Australia’s PM: Firearms to be ‘Collected and Destroyed’

Reading Time: 2:1 min

It is still surprising how misguided officials react to violent tragedies. So little attention is paid to the perpetrators and their twisted ideologies and obvious mental health issues. Instead, anti-gun…

View post

DOJ’s New Second Amendment Section Files Suit Against Virgin Islands Police

Reading Time: 1:53 min

What a difference a year makes! In 2024, U.S. gun owners were subject to the White House Office of Gun Violence Prevention. This ill-conceived outfit was pieced together from organizations…

View post
<script>
  /*Source: https://github.com/Krzysztof-Antosik/Two-direction-Sticky-Sidebar*/
  
  // Verificar el ancho de pantalla al cargar y redimensionar
  function checkScreenWidth() {
    if (window.innerWidth <= 767) {
      // Si la pantalla es menor o igual a 676px, no ejecutar el código
      return;
    }

    const stickyElement = document.querySelector('.fb-sidebar__aside');
    const startPosition = stickyElement.getBoundingClientRect().top;

    let endScroll = window.innerHeight - stickyElement.offsetHeight - 500;
    let currPos = window.scrollY;
    let screenHeight = window.innerHeight;
    let stickyElementHeight = stickyElement.offsetHeight;
    let topGap = 40;
    let bottomGap = 40;

    setTimeout(() => {
      if (stickyElement.hasAttribute('data-top-gap')) {
        const dataTopGap = stickyElement.getAttribute('data-top-gap');
        topGap = dataTopGap === 'auto' ? startPosition : parseInt(dataTopGap);
      }

      if (stickyElement.hasAttribute('data-bottom-gap')) {
        bottomGap = parseInt(stickyElement.getAttribute('data-bottom-gap'));
      }
    }, 100);

    stickyElement.style.position = 'sticky';
    stickyElement.style.top = `${topGap}px`;
    stickyElement.style.height = 'fit-content';

    function positionStickySidebar() {
      endScroll = window.innerHeight - stickyElement.offsetHeight - bottomGap;
      const stickyElementTop = parseInt(stickyElement.style.top.replace('px', ''));

      if (stickyElementHeight + topGap + bottomGap > screenHeight) {
        if (window.scrollY < currPos) {
          if (stickyElementTop < topGap) {
            stickyElement.style.top = `${stickyElementTop + currPos - window.scrollY}px`;
          } else if (stickyElementTop >= topGap && stickyElementTop !== topGap) {
            stickyElement.style.top = `${topGap}px`;
          }
        } else {
          if (stickyElementTop > endScroll) {
            stickyElement.style.top = `${stickyElementTop + currPos - window.scrollY}px`;
          } else if (stickyElementTop < endScroll && stickyElementTop !== endScroll) {
            stickyElement.style.top = `${endScroll}px`;
          }
        }
      } else {
        stickyElement.style.top = `${topGap}px`;
      }
      currPos = window.scrollY;
    }

    function stickyElementToMe() {
      stickyElement.style.top = `${topGap}px`;
    }

    function updateSticky() {
      screenHeight = window.innerHeight;
      stickyElementHeight = stickyElement.offsetHeight;
      positionStickySidebar();
    }

    setTimeout(() => {
      window.addEventListener('resize', () => {
        currPos = window.scrollY;
        updateSticky();
      });

      document.addEventListener('scroll', updateSticky, {
        capture: true,
        passive: true
      });
    }, 1000);
  }

  // Verificar el ancho de pantalla al cargar y redimensionar
  window.addEventListener('load', checkScreenWidth);
  window.addEventListener('resize', checkScreenWidth);
</script>