Skip to content

Instantly share code, notes, and snippets.

View shawncrigger's full-sized avatar

Shawn Crigger shawncrigger

View GitHub Profile
@shawncrigger
shawncrigger / whichones.js
Created December 22, 2020 23:26 — forked from scottjehl/whichones.js
which elements are wider than the viewport?
var list = [];
document.querySelectorAll("body *")
.forEach(function(elem){
if(elem.getBoundingClientRect().width > document.body.getBoundingClientRect().width){
list.push(elem.outerHTML.split('>')[0] + '>');
}
});
confirm( "these elements are wider than the viewport:\n\n " + list.join("\n") )
@shawncrigger
shawncrigger / Preferences.sublime-settings
Last active November 25, 2020 18:19
This is my main preferences file for sublime, it has modifications to prevent beach balling on large files
{
"always_show_minimap_viewport": true,
"auto_complete_cycle": true,
"auto_complete_size_limit": 2097152,
"auto_complete_triggers":
[
{
"characters": "<",
"selector": "text.html"
}
@shawncrigger
shawncrigger / wp-remove-comments.php
Last active March 12, 2020 02:58
Removes all Comments from the Front end and Admin area of WP, just include this file from your theme functions.php
<?php
/**
* Remove WP Comments
*
* This file removes WP Comments from the front-end and back-end of WP.
*
* @package Shawn Criggers WP Tools
* @author Shawn Crigger<ithippyshawn@gmail.com
* @license GPL-2.0-or-later
* @link https://shawn-crigger.herokuapp.com/
@shawncrigger
shawncrigger / browserInfo.js
Created March 9, 2020 21:19
Sets Cookie with useful info like OS, Browser, Version, User Agent, Browser Vendor, Screen Size and View Port Size
(function () {
'use strict';
var fetchDebugInfo = {
options: [],
header: [navigator.platform, navigator.userAgent, navigator.appVersion, navigator.vendor, window.opera],
dataos: [
{ name: 'Windows Phone', value: 'Windows Phone', version: 'OS' },
{ name: 'Windows', value: 'Win', version: 'NT' },
{ name: 'iPhone', value: 'iPhone', version: 'OS' },
<?php
/**
* Main class that interacts with the EscapiaAPI.
*/
class EscapiaAPI {
const API_VERSION = '1.030';
const MAX_RESPONSES = 10000;
const SOAP_NAMESPACE = 'http://www.escapia.com/EVRN/2007/02';

Sending Form Data to Sharpspring from a SquareSpace website.

Recently a new client has a SquareSpace website and they want to use Sharpspring for there CRM which I am all for. But one of the challenges I found was that the SquareSpace forms offered very little customization , so I hacked together some JavaScript that sends the form data to Sharpspring then continues with the Rest of the SquareSpace submit handler.

I'm sure there is probably a better way to do this but this way worked for me and the client is happy so, that's all I can say.

So the idea behind this, is you can built a Native Sharpspring form and make sure all the fields that you have on your form on your website exist, Once you have the Sharpspring form built, click on the button to preview it, and you will need to inspect the form source code, where you will find things like the CompanyID, FormID, and FieldIDs they are all very easy to grab using the web inspector, if anyone has issues doing this just comment on this thread and I'