From 1c2d3df1b0c2fc71658a78f4e741b5485825692e Mon Sep 17 00:00:00 2001 From: ache Date: Sat, 22 Apr 2023 00:08:40 +0200 Subject: Support for local dev --- src/js/love.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/js/love.js b/src/js/love.js index 2402fc9..8cf4632 100644 --- a/src/js/love.js +++ b/src/js/love.js @@ -3,16 +3,14 @@ window.addEventListener('DOMContentLoaded', () => { const articles = document.querySelectorAll('article'); - const config = { - likesEndPointBase: 'ache.one', - }; function getLikeEndPoint() { let currentArticleName = window.location.pathname.split('/')[2]; if (currentArticleName.indexOf('.') > 0) { currentArticleName = currentArticleName.slice(0, currentArticleName.lastIndexOf('.')) } - return `${window.location.protocol}//${config.likesEndPointBase}/like/${currentArticleName}`; + + return `${window.location.origin}/like/${currentArticleName}`; } // The front page have multiple articles -- cgit v1.2.3