Skip to content

Instantly share code, notes, and snippets.

View uddhabh's full-sized avatar

Uddhab Haldar uddhabh

View GitHub Profile
@uddhabh
uddhabh / Divi slider disable first slide animation.css
Created September 30, 2021 11:44
Divi slider disable first slide animation
.et_pb_slide:first-child .et_pb_slide_image,
.et_pb_slide:first-child .et_pb_slide_image img,
.et_pb_slider .et_pb_slide:first-child .et_pb_slide_description,
.et_pb_slide:first-child .et_pb_slide_image img.active {
-webkit-animation-duration: 0s !important;
animation-duration: 0s !important;
opacity: 1 !important;
animation: none !important;
}
<!-- template.name {{ template.name }} -->
{% case template.name %}
{% when 'index' %}
<link rel="canonical" href="{{ shop.url }}">
{% when 'collection' %}
<link rel="canonical" href="{{ shop.url }}/collections/{{ collection.handle }}">
{% when 'product' %}
<link rel="canonical" href="{{ shop.url }}/products/{{ product.handle }}">
{% when 'page' %}
<link rel="canonical" href="{{ shop.url }}/pages/{{ page.handle }}">
@uddhabh
uddhabh / collapsing-mobile-nav.css
Last active December 8, 2020 13:11
Mobile Collapsing Nested Menu
.et_mobile_menu .first-level > a {
background-color: transparent;
position: relative;
}
.et_mobile_menu .first-level > a:after {
font-family: 'ETmodules';
content: '\4c';
font-weight: normal;
position: absolute;
@uddhabh
uddhabh / onetab-delete-all.js
Last active June 12, 2025 22:58
OneTab delete all saved tabs script
// https://intuitive-theory.com/notes/onetab-delete-all-saved-tabs-script/
function delete_single() {
for (clickable of clickables) {
if (!clickable || clickable.innerHTML !== "Delete all")
continue;
clickable.click();
return true;
}
return false;
}
/* Enter Your Custom Functions Here */
// Add custom validation for CF7 form fields
function is_company_email($email){ // Check against list of common public email providers & return true if the email provided *doesn't* match one of them
if(
preg_match('/@gmail./i', $email) ||
preg_match('/@hotmail./i', $email) ||
preg_match('/@live./i', $email) ||
preg_match('/@msn./i', $email) ||
preg_match('/@aol./i', $email) ||