Skip to content

Instantly share code, notes, and snippets.

@james-prado
Created January 28, 2026 20:08
Show Gist options
  • Select an option

  • Save james-prado/a590cffce90af1bd7eab8c988c203225 to your computer and use it in GitHub Desktop.

Select an option

Save james-prado/a590cffce90af1bd7eab8c988c203225 to your computer and use it in GitHub Desktop.
A bookmarklet that hides shopify preview bars using URL Search Params (this will also cause the page to refresh)
javascript: (() => { const url = new URL(window.location.href); const params = new URLSearchParams(url.search); const preview_bar = document.querySelector('#PBarNextFrameWrapper'); if (preview_bar) { params.set('pb', 0); } else { params.set('pb', 1); } window.location.href = %60${location.pathname}?${params}%60;})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment