/lightspeedlet

Bookmarklet helper to flip between front and backend of your Lightspeed theme

Primary LanguageJavaScript

Lightspeedlet

Little helper for quickly switching from the front end of your site to the backend.

Create a new snippet in your current theme called lightspeedlet.rain, then paste the contents of this file there.

Then open up custom.rain and add the following somewhere before the closing </head> tag.

...
  {% include 'snippets/lightsppedlet.rain' %}
</head>

Add a new bookmark to your browser's bookmark bar with the following content.

javascript:void%20function(){function%20e(){var%20e=document.head.querySelector(%22%23LightspeedletShopUrl%22).getAttribute(%22content%22),t=document.head.querySelector(%22%23LightspeedletShopEdit%22);return%22index%22===t.getAttribute(%22name%22)%3Fe:e+t.getAttribute(%22content%22)}console.log(e()),window.open(e(),%22_Lightspeedlet%22)}();