Skip to content

Instantly share code, notes, and snippets.

@atastycookie
Last active November 17, 2022 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atastycookie/e43d9c48f33597918df66eceba93fb71 to your computer and use it in GitHub Desktop.
Save atastycookie/e43d9c48f33597918df66eceba93fb71 to your computer and use it in GitHub Desktop.
check-shopify-admin.js
function getCookie(n){var e=document.cookie,i=n+"=",o=e.indexOf("; "+i);if(-1==o){if(0!=(o=e.indexOf(i)))return null}else{o+=2;var t=document.cookie.indexOf(";",o);-1==t&&(t=e.length)}return decodeURI(e.substring(o+i.length,t))}function doSomething(){null==getCookie("__ssid")?alert("not admin"):alert("admin")}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment