Content deleted Content added
Polygnotus (talk | contribs) No edit summary |
Polygnotus (talk | contribs) No edit summary |
||
Line 132:
const cleanTitle = title.replace(/^Template:/, '');
return `{{${cleanTitle}}}`;
}
// Function to create a text-based icon using data URL
function createTextIcon(text) {
// Create a simple SVG with the text
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="80" height="22" viewBox="0 0 80 22">
<rect width="80" height="22" fill="#f8f9fa" stroke="#a2a9b1" stroke-width="1" rx="2"/>
<text x="40" y="14" font-family="sans-serif" font-size="11" text-anchor="middle" fill="#222">${text}</text>
</svg>`;
// Convert to data URL
return 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svg);
}
Line 172 ⟶ 184:
label: displayTitle,
type: 'button',
action: {
type: 'encapsulate',
|