2A News

Oral Arguments Over AR-15 Bans Set for December

Reading Time: 2:2 min

With a landmark challenge to state and local bans on AR-15s and other sporting rifles on the U.S. Supreme Court docket, anticipation is high for a resolution on this volatile…

View post

Judge Warps History to Justify Hawaii’s Young Adult Gun Ban

Reading Time: 1:58 min

Twisting law and precedents into logical pretzels is nothing new. Still, U.S. District Judge Jill A. Otake elevated that practice into an art form with her decision on Hawaii’s young…

View post

NSSF: Suppressor Transfers Triple Over 2025

Reading Time: 1:56 min

The American appetite for firearms and accessories, particularly with the hated NFA tax on suppressors now a thing of the past, shows no signs of abating. The National Shooting Sports…

View post

NRA Challenges Denver’s Effective Ban on Non-Resident Carry

Reading Time: 3:37 min

Denver’s twofold oppression of lawfully possessed firearms includes the city’s open carry ban and Colorado’s residency requirement to acquire a concealed carry permit. Together, they amount to a de facto…

View post

Good Guy with Gun Stops Knife-Wielding Bank Robbery Suspect

Reading Time: 2:6 min

There’s a good reason we don’t hear about nearly as many bank robberies as we did decades ago. Far beyond the minuscule clearance rates for most crimes, the FBI solves…

View post

Missouri Man Fatally Shoots Suspect Wielding ‘Machine Gun’

Reading Time: 2:1 min

It must be noted that the mainstream media’s idea of a “machine gun” is straight out of The Untouchables, and too many who’ve never set foot on a shooting range…

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>