2A News

Fifth Circuit Rules Machine Guns Not Protected by Second Amendment

Reading Time: 1:55 min

The U.S. Court of Appeals for the Fifth Circuit on Tuesday issued a unanimous ruling rejecting a constitutional challenge to the federal ban on machine guns manufactured post-1986. The Gun…

View post

SC Teen Uses Firearm to Defend Against Alleged Road Rager

Reading Time: 1:51 min

Stereotypes are obviously invalid but consider this scenario. An elderly man encounters a teenage driver, and a dispute erupts that leads to gunfire. So, who was the aggressor? In a…

View post

DOJ: Ban on Mailing Handguns Violates Second Amendment

Reading Time: 3:20 min

The revamped Department of Justice (DOJ) sided with gun rights last week by delivering an opinion on the federal ban on mailing concealable firearms.  The increasingly unpredictable agency opined that…

View post

NSSF: American Civilians Now Own Over 500 Million Firearms

Reading Time: 1:51 min

If anti-gunners are ever to reach their goal of a U.S. without firearms, they have their work cut out for them. A new report by the National Shooting Sports Foundation…

View post

Michigan School District Rolls Out NRA’s Gun Safety Program for Children

Reading Time: 1:59 min

There are hundreds of millions of firearms in circulation in the U.S., and roughly half of all households have at least one gun. And while the overwhelming majority of owners…

View post

Appeals Court Orders DOJ to Proceed in ‘Engaged in the Business’ Lawsuit

Reading Time: 2:11 min

The relationship between the Department of Justice (DOJ) and the Second Amendment community is fraught with inconsistencies.  While Attorney General Pam Bondi’s (R) agency now throws its considerable weight behind…

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>