Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cmt [2013/05/08 14:16] – awf | cmt [2021/04/13 13:50] (current) – 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() { | function replace_urls() { | ||
Line 9: | Line 28: | ||
text = n[i].nextSibling; | text = n[i].nextSibling; | ||
url = text.wholeText.replace(/ | url = text.wholeText.replace(/ | ||
- | | + | |
- | nn.innerHTML = '< | + | |
- | n[i].replaceNode(nn); | + | |
} | } | ||
} | } | ||
} | } | ||
replace_urls()</ | 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); |
- | | + | } |
- | } | + | } |
} | } | ||
</ | </ | ||
- | <a href=" | + | <button onclick=' |
- | button: | + | |
- | <button onclick=' | + | |
<div> | <div> |