Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
cmt [2013/05/08 12:06] – 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: |
+ | |||
+ | < | ||
+ | var jq = document.createElement(' | ||
+ | jq.src = " | ||
+ | document.getElementsByTagName(' | ||
+ | // ... give time for script to load, then type. | ||
+ | |||
+ | |||
+ | var rows = $("# | ||
+ | |||
+ | var elt = ''; | ||
+ | |||
+ | $(elt).insertBefore($("# | ||
+ | </ | ||
+ | |||
+ | |||
+ | Link to translate URLs to links. | ||
+ | |||
+ | (On IE, press F12, select the " | ||
+ | < | ||
+ | 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(/ | ||
+ | n[i].innerHTML = '< | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | replace_urls()</ | ||
+ | And this one zaps the links too | ||
+ | < | ||
+ | n = document.getElementsByTagName(' | ||
+ | for(i = 0; i < n.length; ++i) { | ||
+ | if (n[i].innerText.match(' | ||
+ | text = n[i].nextSibling; | ||
+ | url = text.wholeText.replace(/ | ||
+ | n[i].innerHTML = 'URL (<' | ||
+ | n[i].nextSibling.replaceNode(document.createElement(' | ||
+ | } | ||
+ | } | ||
+ | </ | ||
< | < | ||
< | < | ||
function replace_urls() { | function replace_urls() { | ||
- | n = document.getElementsByTagName(' | + | |
- | for(i = 0; i < n.length; ++i) { | + | for(i = 0; i < n.length; ++i) { |
- | if (n[i].innerText.match(' | + | if (n[i].innerText.match(' |
- | text = n[i].nextSibling; | + | text = n[i].nextSibling; |
- | url = text.wholeText.replace(/ | + | url = text.wholeText.replace(/ |
- | nn = document.createElement(' | + | nn = document.createElement(' |
- | nn.innerHTML = '<' | + | nn.innerHTML = '< |
- | text.replaceNode(nn); | + | n[i].replaceNode(nn); |
- | | + | } |
- | } | + | } |
} | } | ||
+ | |||
</ | </ | ||
- | <button onclick=' | + | <button onclick=' |
<div> | <div> | ||
Line 24: | Line 68: | ||
</ | </ | ||
+ | ~~DISCUSSION~~ | ||