A couple of things that may improve your experience using MacOS.
Many of these settings can be configured via the command line (and thus, scripted) using the MacOS defaults tool.
defaults help
defaults read # list all defaults
defaults write ...
| // Make sure js-cookies are loaded before this code | |
| function verifyAge(gaurdingPage = "./age-verification.html") { | |
| if (!Cookies.get("age-verification")) | |
| { | |
| Cookies.set("intended", window.location.href); | |
| window.location.replace(gaurdingPage); | |
| } | |
| } | |
| function checkAge(homePage = "./index.html", awayPage = "https://www.google.com/?q=") { |
| <div itemscope itemtype="http://schema.org/Product" id="ProductSection" data-section-id="{{ section.id }}" data-section-type="product-template" data-image-zoom-type="{{ section.settings.product_image_zoom_type }}" data-show-extra-tab="{{ section.settings.show_extra_tab }}" data-extra-tab-content="{{ section.settings.extra_tab_content }}" data-enable-history-state="true"> | |
| {% case section.settings.add_to_cart_width %} | |
| {% when 'small' %} | |
| {%- assign btn_class = 'btn--wide' -%} | |
| {%- assign productform_class = 'product-form--wide' -%} | |
| {% when 'medium' %} | |
| {%- assign btn_class = 'btn--wide' -%} | |
| {%- assign productform_class = 'product-form--wide' -%} | |
| {% when 'large' %} |
| {{ 'option_selection.js' | shopify_asset_url | script_tag }} | |
| <script> | |
| // <![CDATA[ | |
| var selectCallback = function(variant, selector) { | |
| if (variant) { | |
| if (variant.available) { | |
| // Selected a valid variant that is available. | |
| $('#add-to-cart-button').removeClass('disabled').removeAttr('disabled').html('Add to Cart'); | |
| } else { |
| import * as React from "react"; | |
| import { useMousePosition } from "~/hooks/useMousePosition"; | |
| /** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */ | |
| export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) { | |
| const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {}; | |
| const [mouseX, mouseY] = useMousePosition(); | |
| const positions = { x, y, h, w, mouseX, mouseY }; | |
| return ( | |
| <div |
Simple floating CSS animation using transform and box-shadow.
A Pen by Joseph Martinez on CodePen.