Skip to content

Instantly share code, notes, and snippets.

View tedw's full-sized avatar

Ted Whitehead tedw

  • Threespot
  • Washington, DC
View GitHub Profile
@tedw
tedw / input.scss
Created April 1, 2021 17:22
Generated by SassMeister.com.
/// Base font size
/// @group Main
/// @type Number
$fs-base-font-size: 16px !default;
/// Convert px to em
/// @group Main
/// @param {Number | Map} $values - Value or values to convert
/// @param {Number} $context [$fs-base-font-size] - Base font size
/// @return {*} - Converted value or list of values
@tedw
tedw / input.scss
Created April 1, 2021 17:16
Generated by SassMeister.com.
/// Base font size
/// @group Main
/// @type Number
$fs-base-font-size: 16px !default;
/// Convert px to em
/// @group Main
/// @param {Number | Map} $values - Value or values to convert
/// @param {Number} $context [$fs-base-font-size] - Base font size
/// @return {*} - Converted value or list of values
@tedw
tedw / google-translate-widget.html
Created March 11, 2021 20:50
Google Translate widget
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
var translateEl= new google.translate.TranslateElement({
includedLanguages: 'en,es',
pageLanguage: 'en'
// autoDisplay: false,// doesn’t seem to have any effect
// multilanguagePage: true// will always include the page language as an option
// NOTE: Setting the layout option will replace the <select> with inaccessible markup
// layout: google.translate.TranslateElement.InlineLayout.SIMPLE,
@tedw
tedw / input.scss
Created January 17, 2021 18:28
Generated by SassMeister.com.
/// Base font size
/// @group Main
/// @type Number
$fs-base-font-size: 16px !default;
/// Convert px to em
/// @group Main
/// @param {Number | Map} $values - Value or values to convert
/// @param {Number} $context [$fs-base-font-size] - Base font size
/// @return {*} - Converted value or list of values
@tedw
tedw / input.scss
Created January 17, 2021 18:24
Generated by SassMeister.com.
/// Base font size
/// @group Main
/// @type Number
$fs-base-font-size: 16px !default;
/// Convert px to em
/// @group Main
/// @param {Number | Map} $values - Value or values to convert
/// @param {Number} $context [$fs-base-font-size] - Base font size
/// @return {*} - Converted value or list of values
@tedw
tedw / input.scss
Created January 16, 2021 19:26
Generated by SassMeister.com.
/// Base font size
/// @group Main
/// @type Number
$fs-base-font-size: 16px !default;
/// Convert px to em
/// @group Main
/// @param {Number | Map} $values - Value or values to convert
/// @param {Number} $context [$fs-base-font-size] - Base font size
/// @return {*} - Converted value or list of values
@tedw
tedw / input.scss
Created January 15, 2021 21:49
Generated by SassMeister.com.
/// Replace `$search` with `$replace` in `$string`
/// @group Utilities
/// @author Hugo Giraudel
/// @param {String} $string - Initial string
/// @param {String} $search - Substring to replace
/// @param {String} $replace ('') - New value
/// @return {String} - Updated string
/// @link http://sassmeister.com/gist/1b4f2da5527830088e4d
/// @link http://hugogiraudel.com/2014/01/13/sass-string-replacement-function/
///
@tedw
tedw / input.scss
Created January 15, 2021 21:30
Generated by SassMeister.com.
/// Replace `$search` with `$replace` in `$string`
/// @group Utilities
/// @author Hugo Giraudel
/// @param {String} $string - Initial string
/// @param {String} $search - Substring to replace
/// @param {String} $replace ('') - New value
/// @return {String} - Updated string
/// @link http://sassmeister.com/gist/1b4f2da5527830088e4d
/// @link http://hugogiraudel.com/2014/01/13/sass-string-replacement-function/
///
@tedw
tedw / Stylefile.yml
Created August 2, 2018 13:01
Customizations for www.threespot.com via StyleURL.
---
version: 1.0
domains:
- www.threespot.com
url_patterns:
- www.threespot.com/*
timestamp: '2018-08-02T13:01:13Z'
id: LroG
redirect_url: https://www.threespot.com/
shared_via: StyleURL - (https://styleurl.app) import and export CSS changes from Chrome
@tedw
tedw / no-jquery-errors.js
Last active June 26, 2018 14:13
Prevent errors when jQuery code is run on a site without jQuery
/* This can be helpful in development when testing a site’s GTM container if it runs custom jQuery code */
// Overwrite jQuery function with dummy that returns itself
window.jQuery = function() {
console.warn(
"Something attempted to call jQuery but it’s not used this page"
);
return jQuery; // enables chaining
};