Skip to content

Instantly share code, notes, and snippets.

@cssango
cssango / whisper.js
Created May 24, 2019 14:29 — forked from jelen07/whisper.js
Algolia autocomplete using custom source
$(function () {
var el = $('#search-query-input');
var cache = [];
function search(query, callback) {
/** Check if query has been already sent */
var stored = cache[query];
if (stored) {
callback(JSON.parse(stored));
@cssango
cssango / feather-attribution.js
Created September 6, 2023 00:16 — forked from joostvanhoof/feather-attribution.js
Feather Attribution script
// www.featherattribution.com. Brought to you by www.scrapingbee.com and www.freddyfeedback.com
class FeatherAttribution {
constructor(options) {
this.storageItems = ['feather_utm_source', 'feather_utm_medium', 'feather_utm_campaign', 'feather_utm_content', 'feather_ref', 'feather_referrer'];
this.checkExpiryDates();
this.setOptions(options);
this.referrer = document.referrer;
this.ref = this.getParameterByName('ref');