This file contains hidden or 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
| var list = []; | |
| document.querySelectorAll("body *") | |
| .forEach(function(elem){ | |
| if(elem.getBoundingClientRect().width > document.body.getBoundingClientRect().width){ | |
| list.push(elem.outerHTML.split('>')[0] + '>'); | |
| } | |
| }); | |
| confirm( "these elements are wider than the viewport:\n\n " + list.join("\n") ) |
This file contains hidden or 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 our Custom Fields to simple products | |
| */ | |
| function mytheme_woo_add_custom_fields() { | |
| global $woocommerce, $post; | |
| echo '<div class="options_group">'; | |
| // Text Field |
This file contains hidden or 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
| /** | |
| * Generic thing-in-orbit-around-a-thing class. | |
| * Has properties to store orbital elements as well as functions to calculate | |
| * them from whatever data is available. | |
| */ | |
| function SoI(name, position, velocity, mass, parentSOI) { | |
| this._name = name | |
| this._position = position | |
| this._velocity = velocity | |
| this._mass = mass |