Skip to content

Instantly share code, notes, and snippets.

Avatar
💯

Jordan Coeyman acoyfellow

💯
View GitHub Profile
@acoyfellow
acoyfellow / example.html
Created Mar 10, 2021
peter custom script
View example.html
<script>
window.success= function(){
if(formData['Finance-Pre-Approved']==='Yes'){
redirect= "https://stellaproperty.phonesites.com/getfinanceprequalified";
}else if(formData['Finance-Pre-Approved']==='No'){
redirect= "https://phonesites.com";
};
};
</script>
@acoyfellow
acoyfellow / phonesites-redirect-example.html
Created Mar 9, 2021
Redirect based on Choice (PhoneSites.com)
View phonesites-redirect-example.html
<script>
window.success= function(){
if(formData.url==='A'){
redirect= "https://google.com";
}else if(formData.url==='B'){
redirect= "https://phonesites.com";
}else if(formData.url==='C'){
redirect= "https://yahoo.com";
};
};
@acoyfellow
acoyfellow / sapper-to-svelte-kit-conversion.md
Last active Jul 9, 2021
My personal Sapper to Svelte-Kit Cheat Sheet (this is not-official, and pre launch, don't use this unless you like fighting dragons and breaking changes)
View sapper-to-svelte-kit-conversion.md
  • change how you access goto -- from: import { goto } from "@sapper/app"; -- to: import { goto } from "$app/navigation";

  • change how you access sessions --from:

View example.html
<script src="https://rawgit.com/acoyfellow/FormSync/master/FormSync.js"></script>
<script>
form.onsubmit= function(e){
e.preventDefault();
};
</script>
View four-cols.html
<div class="flex items-center justify-start flex-wrap">
<a class="w-25 pa2" href="https://google.com">
<img src="http://via.placeholder.com/150"/>
</a>
<a class="w-25 pa2" href="https://google.com">
<img src="http://via.placeholder.com/150"/>
</a>
<a class="w-25 pa2" href="https://google.com">
<img src="http://via.placeholder.com/150"/>
</a>
@acoyfellow
acoyfellow / timestampJawn.js
Last active Oct 2, 2020
Turn a time into a time-zoned future timestamp (date-fns + date-fns-timezone)
View timestampJawn.js
const {
convertToTimeZone
} = require('date-fns-timezone');
const dateFns = require("date-fns");
const {
format,
getTime,
startOfToday,
parse,
addDays,
@acoyfellow
acoyfellow / add-hidden-data.html
Last active Oct 2, 2020
Add fields (after submission) to a leads data to PhoneSites
View add-hidden-data.html
<script>
// place this in the Page > Custom Code (Below Body)
window.beforePost= function(){
formData.myHiddenField= 'magic';
};
</script>
@acoyfellow
acoyfellow / example.html
Created Aug 8, 2020
FormSync + PhoneSites
View example.html
<!--
Add this script to your "Custom Code" section:
-->
<script src="https://rawgit.com/acoyfellow/FormSync/master/FormSync.js"></script>
View font-size-example.html
<style>
form{
font-size: 19px;
}
label[for], .label {
font-size: .85rem;
}
input{
height: 60px;
}
@acoyfellow
acoyfellow / font-size-example.html
Created Jul 31, 2020
Custom font size example
View font-size-example.html
<style>
form{
font-size: 19px;
}
label[for], .label {
font-size: .85rem;
}
input{
height: 60px;
}