Skip to content

Instantly share code, notes, and snippets.

View aghwotu's full-sized avatar
🏠
Working from home

Ovuoke Aghwotu aghwotu

🏠
Working from home
View GitHub Profile
@aghwotu
aghwotu / background.js
Last active April 25, 2023 20:44
Use different popups in your Chrome extension
/*
This is a workaround for the `chrome.action.openPopup()` which is not (yet) available in the current Chrome APIs.
https://github.com/GoogleChrome/developer.chrome.com/issues/2602#issuecomment-1110937788
https://developer.chrome.com/docs/extensions/reference/action/#method-openPopup
*/
// use this in your `background.js` service worker
// here, we check if we are on the Google home page or not and then show the appropriate popup
function setPopupForTab(tab) {
if (tab.url.startsWith('https://www.google.com/')) {
@aghwotu
aghwotu / pass-slots.md
Created September 5, 2021 16:09 — forked from loilo/pass-slots.md
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default