tmplat-extension / tmplat

Browser extension that quickly and easily copies info on the current page using a simple and unique template system
https://tmplat.com
MIT License
53 stars 11 forks source link

Add pair of operations to control current URL context #220

Open neocotic opened 9 years ago

neocotic commented 9 years ago

Users should be able to use URL-specific variables and operations but I can only see this as achievable by adding a pair of new operations that allows the user to change the URL in the current context. For example:

{#switch}http://example.com{/switch}
{host}
{revert}
{host}

... would print:

example.com
github.com

However, we'll also need to consider nested switches and reverts so this is likely more complicated than it would seem, probably requiring some sort of stack.