2A News

Prominent 2A Organizations Respond to Charlie Kirk Assassination

Reading Time: 1:60 min

There is no one more appalled by criminal violence than the gun rights advocate, and when that violence is political, a strong response is necessary. That’s why the National Shooting…

View post

Anti-2A California Lawmakers Send 4 Gun Control Bills to Newsom’s Desk

Reading Time: 1:56 min

California’s mad scramble to the bottom of the Second Amendment oppression heap showed no signs of abating last week when the Assembly sent a trove of gun control bills to…

View post

Armed Houston Man Saves Woman from Alleged Attack by Ex-Boyfriend

Reading Time: 1:50 min

A Houston man who was asked to defend a woman from her ex-boyfriend stepped up last week and quite possibly saved her life. And it was his free exercise of…

View post

Florida AG Declares Open Carry is ‘The Law of the State’

Reading Time: 1:58 min

Florida Attorney General James Uthmeier (R) on Monday followed up a recent court ruling by declaring that open carry is “the law of the state.” Last week, a three-judge panel…

View post

Washington Homeowner Shoots Armed Suspect Allegedly Attempting to Break In

Reading Time: 1:59 min

A Washington state homeowner had to make a tough call early Sunday morning when he notified authorities that he had shot a man allegedly attempting to break into his Pierce…

View post

Third Circuit Issues Mixed Ruling on New Jersey Gun Control Regime

Reading Time: 1:59 min

The U.S. Supreme Court’s monumental 2022 Bruen decision restoring some sanity to gun rights continues to reverberate across the legal landscape. Last week, the Third Circuit Court of Appeals issued…

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>