- [Theme] Add is_swappable helpers #7625 - Pending merge
- [Theme] Return retention_strategies via json - On hold for API-first approach
- [WIP][Checklist] He's making a list and checking it twice - Not scheduled, personal project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 }}'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 ){ |
NewerOlder