4 ms·
I was expecting URL parameters "Famous_company" and"Hyped_technology" to substitute in the text.
by mattsoldo 6y ago
I was expecting URL parameters "Famous_company" and"Hyped_technology" to substitute in the text.
- theandrewbailey 6y agoThat's a bug of $HYPED_TECHNOLOGY. It's been known for years, but they're too busy evangelizing at conferences to fix it.
- saagarjha 6y agoSadly it's a static site, so the best I can do is stick a contenteditable on it :( On the plus side, I'm immune from comments here on Hacker News about why my website isn't a static site.
- detaro 6y agoCould use Javascript to search-replace the text. Progressive enhancement and all :D
- saagarjha 6y agoI stubbornly refuse to serve JavaScript on my website, but perhaps I can whip up a snippet that you can self-XSS yourself with.
- 5- 6y agoHow's this? document.body.innerHTML=document.body.innerHTML.replace(/\$[\w_]*/g,'<span contenteditable role="$&" style="border:dashed 1px gray">$&</span>');document.querySelectorAll('span[role]').forEach(s=>s.addEventListener('input',e=>document.querySelectorAll('span[role="'+e.target.getAttribute('role')+'"]').forEach(t=>t!=e.target&&(t.textContent=e.target.textContent))))