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
| function Model(props) { | |
| var obj = { 'props': props }; | |
| for (o in obj.props) { | |
| if (obj.props.hasOwnProperty(o)) { | |
| this[o] = new Function("value", "if (!arguments.length) return typeof this.props['" + o.toString() + | |
| "'] == 'function' ? this.props['" + o.toString() + "'].call(this) : this.props['" + o.toString() + "'];" + | |
| "this.props['" + o.toString() + "'] = (typeof value == 'function' ? value.call(this) : value); return this") | |
| } | |
| } |
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
| (function (navigator) { | |
| if (navigator.geolocation) { | |
| navigator.geolocation.getCurrentPosition(function(location) { | |
| var lat = location.coords.latitude, | |
| lon = location.coords.longitude, | |
| url = 'https://maps.google.com/maps?q='+lat+','+lon; | |
| console.log('Latitude: %s | Longitude: %s \n%o', lat, lon, url); | |
| var map = window.open(url, "GAMap", "width=1200,height=800"); | |
| }); | |
| } |
NewerOlder