Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
cmt [2013/05/08 12:03] – created awf | cmt [2015/01/28 23:16] – awf | ||
---|---|---|---|
Line 1: | Line 1: | ||
Notes on CMT | Notes on CMT | ||
- | Link to translate URLs to links. | + | Niceify reviews: |
< | < | ||
- | n = document.getElementsByTagName(' | + | var jq = document.createElement(' |
- | for(i = 0; i < n.length; ++i) { | + | jq.src = " |
- | if (n[i].innerText.match(' | + | document.getElementsByTagName(' |
- | text = n[i].nextSibling; | + | // ... give time for script to load, then type. |
- | url = text.wholeText.replace(/ | + | |
- | nn = document.createElement(' | + | |
- | nn.innerHTML = '<' | + | var rows = $("# |
- | text.replaceNode(nn); | + | |
- | | + | var elt = ''; |
+ | |||
+ | $(elt).insertBefore($("# | ||
+ | </ | ||
+ | |||
+ | |||
+ | Link to translate URLs to links. | ||
+ | |||
+ | (On IE, press F12, select the " | ||
+ | < | ||
+ | function replace_urls() { | ||
+ | | ||
+ | for(i = 0; i < n.length; ++i) { | ||
+ | if (n[i].innerText.match(' | ||
+ | text = n[i].nextSibling; | ||
+ | url = text.wholeText.replace(/ | ||
+ | n[i].innerHTML = '< | ||
+ | } | ||
+ | | ||
+ | } | ||
+ | replace_urls()</ | ||
+ | And this one zaps the links too | ||
+ | < | ||
+ | n = document.getElementsByTagName(' | ||
+ | for(i = 0; i < n.length; ++i) { | ||
+ | | ||
+ | text = n[i].nextSibling; | ||
+ | url = text.wholeText.replace(/ | ||
+ | | ||
+ | n[i].nextSibling.replaceNode(document.createElement(' | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | function replace_urls() { | ||
+ | n = document.getElementsByTagName(' | ||
+ | for(i = 0; i < n.length; ++i) { | ||
+ | if (n[i].innerText.match(' | ||
+ | text = n[i].nextSibling; | ||
+ | url = text.wholeText.replace(/ | ||
+ | | ||
+ | nn.innerHTML = '< | ||
+ | n[i].replaceNode(nn); | ||
+ | } | ||
+ | | ||
} | } | ||
- | </code | + | |
+ | </script> | ||
+ | <button onclick=' | ||
+ | |||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ~~DISCUSSION~~ | ||