2A News

Officials Determine SC Mall Shooting was Self-Defense

Reading Time: 1:55 min

It’s bad enough for a South Carolina man that he was shot in the shoulder in a mall last week. While recovering, he learned that he also faces assault charges.…

View post

Gun Rights Groups Sue California Over Glock Ban

Reading Time: 3:26 min

That didn’t take long. Just three days after anti-gun Gov. Gavin Newsom (D) signed California’s shiny new Glock and Glock-style ban into law, a consortium of Second Amendment groups mounted…

View post

SCOTUS Rejects Missouri’s Second Amendment Preservation Act

Reading Time: 1:53 min

The U.S. Supreme Court turned away what could have been a key gun rights case last week, and support for that move came from a surprising source.  Justices declined to…

View post

No Special Session of Minnesota Legislature After Push for ‘Assault Weapons’ Prohibition Fails

Reading Time: 1:56 min

Minnesota’s considerable gun-owning population can breathe easier after Gov. Tim Walz (D) raised the white flag in defeat over his push for a special legislative session. The embattled governor wanted…

View post

California Gov. Newsom Signs ‘Glock Ban’ Legislation into Law

Reading Time: 1:51 min

California added to its growing gun control mess on Friday when Gov. Gavin Newsom (D) signed Assembly Bill 1127, the controversial “Glock Ban,” into law. New sales of these wildly…

View post

2A Coalition Files Suit Challenging National Firearms Act

Reading Time: 3:45 min

The National Firearms Act of 1934 (NFA) is a legal corpse that has not fallen over yet, and gun rights groups want to give it that final shove into the…

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>