• File: AddUrlRef.js
  • Full Path: /home/docteuh/www/plugins/really-simple-ssl/settings/src/utils/AddUrlRef.js
  • Date Modified: 06/18/2026 4:25 PM
  • File size: 310 bytes
  • MIME-type: text/plain
  • Charset: utf-8
export const addUrlRef = (url) => {
    const ref = rsssl_settings.ref;
    if ( parseInt(ref) > 0 ) {
        const [baseUrl, hash] = url.split('#');
        const separator = baseUrl.includes('?') ? '&' : '?';
        url = `${baseUrl}${separator}ref=${ref}${hash ? `#${hash}` : ''}`;
    }
    return url;
}