This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

Notes on CMT Link to translate URLs to links. Navigate to a page with URLs in it, then execute this in your browser's debug console. (On IE, press F12, select the "Console" tab, and paste in the code below.) <code> function replace_urls() { n = document.getElementsByTagName('b'); for(i = 0; i < n.length; ++i) { if (n[i].innerText.match('URL:')) { text = n[i].nextSibling; url = text.wholeText.replace(/\s+/,''); nn = document.createElement('div'); nn.innerHTML = '<b>URL</b> (<'+'a target="_blank" href="' + url + '">link<'+'/a>):'; n[i].replaceNode(nn); } } } replace_urls()</code> <html> <script> function replace_urls() { n = document.getElementsByTagName('b'); for(i = 0; i < n.length; ++i) { if (n[i].innerText.match('URL:')) { text = n[i].nextSibling; url = text.wholeText.replace(/\s+/,''); nn = document.createElement('div'); nn.innerHTML = '<b>URL</b> (<'+'a target="_blank" href="' + url + '">link<'+'/a>):'; n[i].replaceNode(nn); } } } </script> <button onclick='javascript:replace_urls()'>TEST</button> <div> <b>URL:</b> http://awf.fitzgibbon.ie/cmt </div> </html> ~~DISCUSSION~~

Andrew Fitzgibbon, 2013/05/08 15:23

F12 on chrome too.

Enter your comment. Wiki syntax is allowed: