Skip to main content
Glama
get-projectid.source.js1.01 kB
(function() { var selection = window.getSelection(); if (!selection.rangeCount) { alert('No selection found. Please select some text first.'); return; } var node = selection.anchorNode; // If the node is a text node, start from its parent element if (node.nodeType === Node.TEXT_NODE) { node = node.parentElement; } // Walk up the DOM tree to find an element with projectid attribute while (node && node !== document.body) { if (node.getAttribute && node.getAttribute('projectid')) { var projectId = node.getAttribute('projectid'); // Copy to clipboard navigator.clipboard.writeText(projectId).then(function() { alert('Project ID copied to clipboard: ' + projectId); }).catch(function() { // Fallback if clipboard API fails prompt('Project ID (Ctrl+C to copy):', projectId); }); return; } node = node.parentElement; } alert('No element with projectid attribute found in the parent chain.'); })();

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mholzen/workflowy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server