2A News

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

Report: 2A Supporters Challenge Virgin Islands’ Draconian Gun Laws

Reading Time: 2:1 min

How atrocious are gun laws imposed on residents and visitors of the U.S. Virgin Islands? Remember that the Caribbean territory is subject to U.S. law and the Constitution, and American…

View post

Dhillon Predicts SCOTUS Will Legalize AR-15s Nationwide

Reading Time: 1:59 min

Assistant Attorney General Harmeet Dhillon went on the record this week in an interview with Just the News with a prediction that certainly raised eyebrows. The federal official told the…

View post

DOJ Sues Denver and Colorado Over ‘Assault Weapons’ and Magazine Bans

Reading Time: 2:6 min

The new and somewhat improved Department of Justice (DOJ) took a stand on Wednesday, when the historically embattled agency sued the state of Colorado after filing similar litigation against the…

View post

National Gun Sales Increase in April as Virginia’s Soar

Reading Time: 1:54 min

The always-interesting data on firearm and firearm-related sales across the nation are in for April, and they reveal a clear truth. The American public continues to support the Second Amendment…

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>