let referrerUrl = document.referrer;
let referrerUrlMatch = referrerUrl.match(/^https?:\/\/www\.(venetian|palazzo)\.com(?!\/meetings(\/|$))/);
let referrerName = referrerUrlMatch ? referrerUrlMatch[1] : null;
At that point, referrerName is either “venetian", "palazzo", or null (if referrer URL was from neither of the two sites, or if the path started with “/meetings/“), and the referrerUrl can be used as needed.
Examples: "https://www.venetian.com/meetings” returns null
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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
.test | |
$char: "E008" | |
$res: "" | |
@for $i from 1 through 4 | |
$res: $res + $char |