Right to Carry

Less-Lethal Firearms Gaining in Popularity as ‘Personal Safety Technology’

Reading Time: 2:33 min

Less-Lethal Firearms Gaining in Popularity as ‘Personal Safety Technology’. Americans cherish choices almost as much as their constitutional freedoms, and many seeking to defend themselves from violent criminals are choosing…

View post

Washington State Ban on Standard-Capacity Magazines Upheld

Reading Time: 2:22 min

Washington State Ban on Standard-Capacity Magazines Upheld. Without the means to ban firearms outright, which of course is the aim of many lawmakers, anti-gunners must resort to attacking the right…

View post

Texas Lawmakers Advance Bill to Prohibit Local Taxpayer-Funded Firearm ‘Buybacks’

Reading Time: 2:23 min

Texas Lawmakers Advance Bill to Prohibit Local Taxpayer-Funded Firearm ‘Buybacks’. Of all the silly schemes dreamed up by anti-gunners, “buybacks” are some of the most foolish. Does anyone honestly believe…

View post

New Oklahoma Law Permits ‘Defensive Display’ of Firearm to Protect Property

Reading Time: 2:24 min

New Oklahoma Law Permits ‘Defensive Display’ of Firearm to Protect Property. Very little is more fundamental and sacred than the right to defend loved ones and property. This goes to…

View post

House Passes Bill to Expand Carry Rights for Off-Duty and Retired Police Officers

Reading Time: 2:24 min

House Passes Bill to Expand Carry Rights for Off-Duty and Retired Police Officers. Constitutional rights should not be terminated or changed just for crossing a state line or being on…

View post

NY Lawmakers Request DOJ Review of Controversial Gun Control Laws

Reading Time: 2:25 min

NY Lawmakers Request DOJ Review of Controversial Gun Control Laws. Political courage is a rarity in modern America, which makes the recent actions of two New York state lawmakers all…

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>