2A News

Memphis Woman Wields Firearm to Defend Against Ex-Boyfriend

Reading Time: 2:1 min

A Memphis woman was thrown into a fight-or-flight confrontation early Wednesday morning, and the tale is as old as time. According to reports, the ex-boyfriend had already shown up at…

View post

Anti-Gun Hawaii Legislature Rejects Several Gun Control Bills

Reading Time: 1:57 min

Make no mistake, Hawaii’s state government is heavily stacked with opponents of gun rights, and there are powerful legal actions against this regime winding through the court systems. But even…

View post

2A Groups Challenge California’s Long-Standing Open Carry Ban

Reading Time: 2:2 min

It has been many decades since California first banned open carry back in 1967. The Beatles were at their height, and social change was everywhere the last time a state…

View post

ATF Releases Draft Version of New Form 4473 With Modifications

Reading Time: 1:60 min

The Bureau of Alcohol, Tobacco, Firearms, and Explosives (ATF) released a draft version of its proposed new Form 4473 late last week. Some changes are sure to incite passions on…

View post

Connecticut 2A Group Blasts Attempt to Ban Popular Handguns

Reading Time: 1:57 min

Connecticut lawmakers late last week pushed through a hot-button bill to ban Glock-style handguns. The partisan vote in the State Senate sent H5032 to Gov. Ned Lamont’s (D) desk, where…

View post

NRA, FPC Challenge Permanent Loss of 2A Rights by Nonviolent Felons

Reading Time: 1:60 min

On Thursday, two Second Amendment powerhouses combined forces and filed an amicus brief in the legal challenge to the lifetime firearm ban imposed on nonviolent felons. The National Rifle Association…

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>