2A News

Report: Minneapolis Firearm Instructors See Massive Surge in Interest

Reading Time: 2:7 min

Fundamental rights are often taken for granted, especially during times of peace and prosperity when it appears that this state of being will last forever. Recent unrest in Minnesota was…

View post

Half of Canada’s Provinces Reject Ottawa’s Gun ‘Buyback’ Scheme

Reading Time: 1:53 min

Canada’s controversial gun confiscation scheme, obviously misrepresented as a “buyback,” is dying a slow and painful death as fully half the nation is in open rebellion. It’s bad enough that…

View post

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
<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>