Skip to content

Instantly share code, notes, and snippets.

View junaidkbr's full-sized avatar
🔥

Junaid Ahmed junaidkbr

🔥
View GitHub Profile
@junaidkbr
junaidkbr / linkedin-remove-connection.js
Last active August 30, 2022 12:20
Unfollow and Remove LinkedIn Connection
/**
* Quickly unfollow and remove from connections
* the LinkedIn connection you're currently viewing
*
* Enter the source code in browser Dev Tools or
* bookmark the bookmarlet version for one-click solution
*/
/* Source Code Start */
const actionsWrapper = document.querySelector('#main .pvs-profile-actions > *:last-child > div');
@junaidkbr
junaidkbr / gist:6638192d65fc03e2e55a3d9f9a060f98
Last active January 2, 2025 15:23
Shortcut: Open Shopify pages in Customizer from the frontend
const shopName = window.Shopify.shop.replace(".myshopify.com", "");
const themeId = window.Shopify.theme.id;
let previewPath = "";
if (window.location.pathname !== "/") {
previewPath = encodeURIComponent(window.location.pathname);
}
const customizerUrl = `https://admin.shopify.com/store/${shopName}/themes/${themeId}/editor?previewPath=${previewPath}`;
window.open(customizerUrl, '_blank');
@junaidkbr
junaidkbr / gist:88f0677a7e2ca3e1c8b0a38768553cf1
Last active January 2, 2025 15:24
Open Shopify editor for Shopify resources (page, product, collection, article) from the frontend
const shopName = window.Shopify.shop.replace(".myshopify.com", "");
const { rtyp: resourceType, rid: resourceId } = window.__st;
if (["product", "collection", "page", "article"].includes(resourceType)) {
const url = `https://admin.shopify.com/store/${shopName}/${resourceType}s/${resourceId}`;
window.open(url, "_blank");
} else {
alert("Unsupported resource type");
}