2A News

Anti-2A Forces Target New Mexico’s Gun Shop Owners

Reading Time: 1:53 min

New Mexico’s powerful anti-gun lobby is hard at work attempting to pile yet more restrictions on the right to keep and bear arms. The latest legal infraction, Senate Bill 17,…

View post

SAF Files Brief Supporting Challenge to Firearm Ban for Marijuana Users

Reading Time: 2:0 min

With evolving federal and state laws concerning marijuana use tied to firearms, it is high time that the U.S. Supreme Court provided clarity. That will come soon.  The Second Amendment…

View post

Anti-Gunners Propose Blanket Ban on Online Ammunition Sales

Reading Time: 1:52 min

Just like bad pennies, the misguided notions of anti-gunners never seem to truly go away. They are proposed, generally voted down, and then loudly resuscitated for another try. That’s the…

View post

2A Supporters Counter Trump’s Comments on Minnesota ICE Shooting

Reading Time: 2:11 min

While there is no question that the current administration is an improvement over recent White House occupants when it pertains to gun rights, there remains quite a bit of work…

View post

Prepared Chicago Man Holds Off Two Would-Be Robbers

Reading Time: 1:52 min

It’s a good idea not to be out running around in the dead of night in Chicago, but many people’s occupations and lifestyles leave them with non-traditional schedules. If you…

View post

GOA: NH Gun Owners Face a Flood of Firearm-Related Legislative Measures

Reading Time: 1:57 min

January is the month when state lawmakers nationwide roll out their proposals, and they are a mixed bag every year for law-abiding gun owners. New Hampshire is the latest prime…

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>