2A News

Report: Officers Arrest Driver Over AR Pistol with Aftermarket Brace

Reading Time: 2:38 min

The importance of having talented writers exposing official suppression of Second Amendment rights cannot be overstated.  That’s why, when veteran gun rights expert and Second Amendment Foundation (SAF) Investigative Journalism…

View post

NY Court Surprises 2A Community with Common Sense Gun Ruling

Reading Time: 2:21 min

The U.S. judicial system is meant to be apolitical and to apply constitutional protections without bias, but the role of human arbiters makes this standard difficult, to say the least. …

View post

After Hemani, GOA Sues Pennsylvania Over Guns and Cannabis

Reading Time: 2:3 min

One obvious result of winning a landmark U.S. Supreme Court gun rights case 9-0 is that the people have a much clearer path to abolish laws that contradict the new…

View post

ATF, NSSF Launch Campaign Against ‘Straw Purchases’

Reading Time: 1:56 min

No serious member of the shooting community wants firearms in the wrong hands. With this in mind, the Bureau of Alcohol, Tobacco, Firearms, and Explosives (ATF) once again teamed up…

View post

Gun Rights Group Cautions Hawaii Business Owners to Value Good Customers

Reading Time: 1:51 min

Hawaii’s “vampire rule” died an overdue death recently when the U.S. Supreme Court ruled in Wolford v. Lopez that the odd statute was clearly unconstitutional. As it had always been,…

View post

Appeals Court Upholds Illinois Gun Ban as SCOTUS Decision Looms

Reading Time: 2:12 min

It will be months before the U.S. Supreme Court hears arguments in two challenges to state bans on AR-15s and similar firearms, but the stakes are sky-high and getting higher.…

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>