hotels

Apr
01

Five Years and Counting

Five years ago, I decided to try something new. After months of applying and looking for work, I received an
3 min read
Oct
09

I Made A Thing

I’ve been quiet in my space1 here for several weeks for good reason. I’ve been reading and thinking
1 min read

Latest

Five Years and Counting

Five years ago, I decided to try something new. After months of applying and looking for work, I received an email from a former employer asking me if I could do some work for them from a distance. That led to another hotel contacting me, and off I went on

I Made A Thing

I’ve been quiet in my space1 here for several weeks for good reason. I’ve been reading and thinking a lot about the practice of mindfulness and Buddhism, which I hope to tackle more of in the coming weeks, but I also did something a little unexpected: I made

DigitalOcean Referral Badge

Social Links


Mastodon
document.addEventListener('DOMContentLoaded', function() { // Get all links in the document const links = document.getElementsByTagName('a'); const currentDomain = 'foursides.ca'; const amazonAffiliateTag = 'four0b-20'; // Replace with your Amazon affiliate tag // Process each link Array.from(links).forEach(link => { const href = link.getAttribute('href'); // Skip if link is null, empty, or just a hash if (!href || href === '' || href.startsWith('#')) { return; } try { const url = new URL(href); // Handle Amazon links if (url.hostname.includes('amazon.')) { // Remove any existing tag url.searchParams.delete('tag'); // Add your affiliate tag url.searchParams.set('tag', amazonAffiliateTag); // Update the link attributes link.setAttribute('href', url.toString()); link.setAttribute('target', '_blank'); link.setAttribute('rel', 'nofollow noopener noreferrer'); } // Handle other external links (not Amazon and not internal) else if (!url.hostname.includes(currentDomain)) { // Add referrer parameter url.searchParams.set('ref', 'foursides.ca'); // Update the link attributes link.setAttribute('href', url.toString()); link.setAttribute('target', '_blank'); link.setAttribute('rel', 'nofollow noopener noreferrer'); } } catch (e) { // If URL parsing fails, it's likely a relative URL (internal link) // Do nothing for internal links console.debug('Skipping internal link:', href); } }); });T