2A News

NSSF Announces Challenge to Connecticut Gun Ban

Reading Time: 2:7 min

The firearm industry trade association, the National Shooting Sports Foundation (NSSF), announced that the group will challenge Connecticut’s new ban on striker-fire handguns, which are nearly ubiquitous in the shooting…

View post

Firearm Sales Strong in May as NFA Checks Explode

Reading Time: 1:48 min

The public’s appetite for the most advanced and safest firearms did not dissipate in May, according to the National Shooting Sports Foundation (NSSF). Adjusted retail sales numbers showed another increase,…

View post

Good Guy with a Gun Stops Ax-Wielding Attacker

Reading Time: 1:59 min

There’s good news and there’s better news to share on the Second Amendment front. An unidentified Raleigh, North Carolina, man came upon a horrific scene just before 11 a.m. Tuesday…

View post

Florida HOA Backs Off Anti-Gun Policy After Warning Letter

Reading Time: 1:56 min

Power corrupts, and its corrosive effects are evident in private organizations that believe they can dictate how others live their lives. One HOA in Port St. Lucie, Florida, backed off…

View post

Judge Halts Virginia’s Effort to Reinstate Universal Background Checks

Reading Time: 2:4 min

On Wednesday, some much-needed good news for Virginia’s sporting community came when Lynchburg Circuit Judge Patrick Yeatts stopped the state’s latest push to conduct universal background checks on all private…

View post

SAF Expands Suit Over Prohibited Roommate Gun Ban

Reading Time: 2:2 min

The Second Amendment Foundation (SAF) and its partners filed suit against several Bergen County, New Jersey, officials in November on behalf of Elsid Aliaj, and now the legal action includes…

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>