Skip to content

Instantly share code, notes, and snippets.

View VizualAbstract's full-sized avatar
📸
Haters will say this is Photoshopped

Corey Matthew Capetillo VizualAbstract

📸
Haters will say this is Photoshopped
View GitHub Profile
@VizualAbstract
VizualAbstract / hideaddrbar.js
Created March 15, 2012 01:56 — forked from scottjehl/hideaddrbar.js
Normalized hide address bar for iOS & Android
/*
* Normalized hide address bar for iOS & Android
* (c) Scott Jehl, scottjehl.com
* MIT License
*/
(function( win ){
var doc = win.document;
// If there's a hash, or addEventListener is undefined, stop here
if( !location.hash && win.addEventListener ){
<form action="/cart/add" method="post">
{% if product.variants.size > 1 %}
{% if product.options[0] %}
{% assign used = '' %}
<label for="select-one">{{ product.options[0] }}</label>
<select id='select-one' onchange="letsDoThis()">
{% for variant in product.variants %}
{% unless used contains variant.option1 %}
<option value="{{ variant.option1 }}">{{ variant.option1 }}</option>
{% capture used %}{{ used }} {{ variant.option1 }}{% endcapture %}
@VizualAbstract
VizualAbstract / 0_reuse_code.js
Created October 27, 2016 16:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<script>
(function() {
var ReCharge = {}
ReCharge.delay = 1;
ReCharge.listener_delay = 1;
ReCharge.product_id = {{ product.id }};
ReCharge.subscription_id = {{ subscription_id }};
ReCharge.subscription_only = {{ subscription_only }};
ReCharge.subscription_first = {{ select_subscription_first }};
ReCharge.default_purchase_type = '{{ default_purchase_type }}';
function getProductForm(product_id) {
var forms = document.querySelectorAll('[action^="/cart/add"]');
if (!forms.length) {
alert('ReCharge cannot load: Product form not found.');
return false;
} else if (forms.length > 1) {
var product_form;
forms.forEach(function(form, i) {
if (form[i] && form[i].getAttribute('data-productid') !== null) {
if (form[i].getAttribute('data-productid') == product_id) {
@VizualAbstract
VizualAbstract / frontend_notes.md
Last active September 25, 2018 16:49
Des and Frontend notes
@VizualAbstract
VizualAbstract / apple_pay_notes.md
Created October 9, 2018 17:01
# For Apple Pay implementation (frontend)

For Apple Pay implementation (frontend)

by Corey

Payment Request Button

  • Upgrade Stripe JS api from v2 to v3
    • https://js.stripe.com/v3/
  • Add Stripe Element
  • ``
@VizualAbstract
VizualAbstract / announce_upcoming_change
Created December 6, 2018 17:35
Announcement: Upcoming changes
*ANNOUNCEMENTS:* Upcoming changes
*ACTION: file or function - action description*
`Who does this affect?`
Brief description
`Does this affect current stores?`
*ANNOUNCEMENTS:* Deployed changes
*ACTION: file or function - action description*
For a description of the changes, please see previous "Upcoming changes" announcement
@VizualAbstract
VizualAbstract / team_charter.md
Last active August 24, 2022 02:14
Frontend team charter