Skip to content

Instantly share code, notes, and snippets.


Francesco Stella francescostella

Block or report user

Report or block francescostella

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
francescostella / SassMeister-input.sass
Created Jul 7, 2015
Generated by
View SassMeister-input.sass
// ----
// libsass (v3.2.5)
// ----
$char: "E008"
$res: ""
@for $i from 1 through 4
$res: $res + $char
francescostella / gist:c0bcd542d64aa12191a5724a45302527
Created Oct 17, 2018
Venetian/Palazzo referer detection for 'Back to' link
View gist:c0bcd542d64aa12191a5724a45302527
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: "” returns null

You can’t perform that action at this time.