Skip to content

Instantly share code, notes, and snippets.

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 25, 2025 01:26
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@webprogramozo
webprogramozo / tesco_online_menu_highlighter.js
Last active September 25, 2022 11:52
Auto-highlight the current main- and subcategory on Tesco Online website's main menu
const $fe = function(selector, callable){[].forEach.call(document.querySelectorAll(selector),callable);};
const $fei = function(selector, callable, interval){setInterval(function(){$fe(selector, callable);}, interval);};
const breadcumbSelector = '.beans-breadcrumb__list-item a[href] span.beans-link__text';
$fei(
breadcumbSelector, function(spanLinkItem){
const parentHref = spanLinkItem.parentElement.getAttribute('href');
const finalHref = parentHref.slice(0,-4) + "?include-children=true";
const finalSelector = `li.menu__item a[href='${finalHref}']`;
const formatClass = 'bandi-highlight';
const item = document.querySelector(finalSelector);