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
/** | |
* Add save/restore buttons to Infinite Craft | |
* Works by saving the elements that you have created into localStorage | |
* | |
* Remember to hit `Save` before closing your tab, Happy Crafting! | |
*/ | |
const saveElements = () => { | |
localStorage.setItem('saved-elements', JSON.stringify(window.$nuxt.$children[2].$children[0].$children[0].$data.elements)); | |
} |
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
/** | |
* glideInstance here is the instance of Glide (created via const glideInstance = new Glide(...)) | |
* sliderElement here is the top-level container element, used for searching for glide elements within | |
*/ | |
glideInstance.on(['mount.after', 'run.after'], () => _glideHandleHeight(sliderElement)); | |
/** | |
* @param {HTMLElement} slider | |
*/ |
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
/** | |
* A collection of good helper/utility functions | |
* that may be required in a project | |
* | |
* Andrew Haine - 2018 | |
*/ | |
/** | |
* Using CSS transforms in JavaScript? You'll need to stick some vendor prefixes in there | |
* @param {Object} el The element to transform |
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
class Parallax { | |
constructor(el) { | |
if(!el.length) { | |
return; | |
} | |
else { | |
this._doParallax(el); | |
} | |
} |
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
<?php | |
class UserformsSubmissionExtension extends DataExtension | |
{ | |
/** | |
* Update Fields | |
* @return FieldList | |
*/ | |
public function updateCMSFields(FieldList $fields) | |
{ |