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
const detectBraveBrowser = () => { | |
return new Promise((resolve, reject) => { | |
if(!navigator.userAgent.includes('Chrome')) { return resolve(false); } | |
const xhr = new XMLHttpRequest(); | |
const onload = () => { | |
if(xhr.status >= 200 && xhr.status < 300) { | |
const response = JSON.parse(xhr.responseText); | |
if(!response) { return resolve(false); } |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Google Map Example</title> | |
<style> | |
html, | |
body, | |
#my-map { | |
height: 100vh; |
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() { | |
var doc = document.documentElement; | |
doc.setAttribute('data-useragent', navigator.userAgent); | |
})(); |
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
<ul class="unstyled-list"> | |
<li>list item</li> | |
<li><a href="#" alt="">list item</a></li> | |
<li> | |
<strong>list item</strong> | |
<ul> | |
<li>sub list item</li> | |
<li>sub list item</li> | |
</ul> | |
</li> |
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
<div class="container"> | |
<div class="row"> | |
<div class="column-11 push-1"> | |
<p>.push-1</p> | |
</div> <!-- end .column-1 --> | |
</div> <!-- end .row --> | |
<div class="row"> | |
<div class="column-10 push-2"> | |
<p>.push-2</p> |
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
<div class="container"> | |
<div class="row"> | |
<div class="column-12"> | |
<p>.column-12</p> | |
<div class="row gutters"> | |
<div class="column-4"> | |
<p>.column-4</p> | |
</div> <!-- end .column-4 --> |
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
<div class="container"> | |
<div class="row gutters"> | |
<div class="column-1"> | |
<p>.column-1</p> | |
</div> <!-- end .column-1 --> | |
<div class="column-11"> | |
<p>.column-11</p> | |
</div> <!-- end .column-11 --> | |
</div> <!-- end .row --> |
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
<div class="container"> | |
<div class="row"> | |
<div class="column-1"> | |
<p>.column-1</p> | |
</div> <!-- end .column-1 --> | |
<div class="column-11"> | |
<p>.column-11</p> | |
</div> <!-- end .column-11 --> | |
</div> <!-- end .row --> |
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 newMap(lat, long, zoom, domID, clickHandler) { | |
var latLong = new google.maps.LatLng(lat,long), | |
options = { | |
center: { | |
lat : lat, | |
lng : long | |
}, | |
// set base map | |
mapTypeId: google.maps.MapTypeId.TERRAIN, |
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
router.route('/api/categories/:categoryID') | |
.get(function(req, res) { | |
// query | |
connection.query('SELECT listers.lister_id, listers.listing_name, listers.city, listing_categories.category_name FROM listing_categories INNER JOIN listings ON listing_categories.listing_category_id = listings.listing_category_id JOIN listers ON listings.lister_id = listers.lister_id WHERE listings.listing_category_id = ' + req.param('categoryID'), function(err, rows, fields) { | |
if(err) { | |
res.send(err); | |
console.log(err); | |
connection.end(); | |
} else { | |
res.send(rows); |
NewerOlder