Skip to content

Instantly share code, notes, and snippets.

@cspags
cspags / reset-webflow-form.js
Last active September 25, 2023 16:17
Webflow - Reset a form to it's original state after it is submitted, instead of showing the success message
$(function() {
/*** START SCRIPT CONFIG ***/
// Replace with value for your form. ie. "#your-form-id" or ".your-form-class"
var FORM_SELECTOR = ".recipe-form";
// Do you want to hide the success message after the form is submitted?
var HIDE_SUCCESS_MESSAGE = false;
// Do you want the success message to show above the form?
/* prebid.js v0.24.0
Updated : 2017-11-22 */
!(function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)})([(function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e){e.forEach((function(e){if(c(e.called)===R)try{e.call(),e.called=!0}catch(t){_.logError("Error processing command :","prebid.js",t)}}))}function a(e){var t=w._bidsRequested.map((function(e){return e.bids.map((function(e){return e.placementCode}))})).reduce(p.flatten).filter(p.uniques);return _.contains(t,e)?!0:(_.logError('The "'+e+'" placement is not defined.'),void 0)}function o(){w._bidsRequested=[],w._bidsReceived=w._bidsReceived.filter((function(e){return!w._adUnitCodes.includes(e.adUnitCode)}))}function d(e,t,r){e.defaultView&&e.defaultView.frameElement&&(e.defaultView.frameElement.width=t,e.defaultVi
@cspags
cspags / gist:8bb50b0e3e976ea94c84
Created February 5, 2015 18:21
Add colors to JIRA component names on the Agile board
(function() {
var colors = {
"Web App": "#d9a3d5",
"Native": "#D84315",
"Android": "#81C784",
"Plugin": "#7986CB",
"Server": "#4FC3F7",
"iOS": "#F9A825",
"Admin": "#4DB6AC"
}
@cspags
cspags / elevator_saga_v1
Last active August 29, 2015 14:13
Fairly simple strategy for beating challenges 1 - 5
{
init: function(elevators, floors) {
// set up an array to track which floors have people waiting
floorStatus = [];
$.each(floors, function(index, floor) {
floorStatus.push(false);
floor.on("down_button_pressed", function() {
floorStatus[floor.floorNum()] = true;