2A News

2A Groups Challenge California’s Tax on Firearms and Ammo

Reading Time: 1:54 min

“The power to tax is the power to destroy.” These famous words were spoken by Chief Justice John Marshall in 1819 in a landmark Supreme Court case concerning government power.…

View post

Canadian Gun Owners Not Compensated for Surrendered Firearms

Reading Time: 1:51 min

Gun grabbers north of the border are busy wiping egg off their faces as the national confiscation scheme descends into chaos. The latest development demonstrates the frustration of the shooting…

View post

Administration Embraces ‘Frame and Receiver’ Final Rule

Reading Time: 1:59 min

The apparent schizophrenia of the Trump administration on Second Amendment rights shows no sign of abating. While the firearms community welcomed the formation of the Department of Justice’s (DOJ) Second…

View post

Empire State Lawmakers Target BB and Pellet Guns

Reading Time: 1:59 min

Just when you think anti-gunners have scraped the bottom of the barrel, along comes an even more ridiculous idea that leaves good people shaking their heads. New York lawmakers are…

View post

Texas Man Shoots Suspected Catalytic Converter Thief

Reading Time: 1:57 min

In real estate, they say that “location” is everything. The same rule, unfortunately, applies to law-abiding Americans who exercise their Second Amendment rights for self-defense. In some locales, the intended…

View post

Final Rule Ends Banking Discrimination Against Weapons Industry

Reading Time: 1:55 min

Wall Street giants in recent years have made no secret that many do not want to provide essential financial services to the firearms industry. They used the nebulous “reputational risk”…

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>