Skip to content

Instantly share code, notes, and snippets.

View kaesetoast's full-sized avatar
🤔
Coding

Philipp Nowinski kaesetoast

🤔
Coding
View GitHub Profile
// check if referrer is outside of the website scope
if (document.referrer.indexOf(`${window.location.protocol}//${window.location.host}`) === -1) {
window.localStorage.setItem('__fnp_referrer', document.referrer);
}
const referrerField = document.querySelector('[name="signupform[referrer]"]');
const referrerValue = window.localStorage.getItem('__fnp_referrer');
// write stored referrer value back to hidden field in signup-form
if (referrerField && referrerValue) {
-----------------------------------------------------------------------------
| Tarif | Anbieter | Leistungsbeschreibung | Vergleichbar |
-----------------------------------------------------------------------------
| Standard | TouringCars | Unbegrenzte Freikilometer | ✔️ |
| Standard | TouringCars | Transfer inklusive | ✔️ |
| Standard | TouringCars | Vom Chef signierter Wackeldackel | ✖️ |
| Standard | IndieCampers | Unbegrenzte Freikilometer | ✔️ |
-----------------------------------------------------------------------------
<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\Uuid;
trait UuidTrait
@kaesetoast
kaesetoast / intl.js
Created February 10, 2021 16:58
Example of using the Intl API to format a date
// output: 10.02.2021, 17:53
new Intl.DateTimeFormat('de-DE', {
day: '2-digit',
month: '2-digit',
year: 'numeric',
hour: '2-digit',
minute: '2-digit',
}).format(new Date(comment.created_at));