diff options
author | Tom Willemsen | 2011-03-07 09:04:49 +0100 |
---|---|---|
committer | Tom Willemsen | 2011-03-07 09:04:49 +0100 |
commit | 94d2fc1815a919734353c942f224db1de4b4fcb8 (patch) | |
tree | 4168e816ead132bfa3510e272427837c3895f5e2 /emacs.d/nxhtml/tests/in/chunks.html | |
parent | d0e7674fdb1de12c8de202d4028a5d7ed3669a6e (diff) | |
download | dotfiles-94d2fc1815a919734353c942f224db1de4b4fcb8.tar.gz dotfiles-94d2fc1815a919734353c942f224db1de4b4fcb8.zip |
Django, org
* Added nxhtml, mostly for django support.
* Changed some org settings.
Diffstat (limited to 'emacs.d/nxhtml/tests/in/chunks.html')
-rw-r--r-- | emacs.d/nxhtml/tests/in/chunks.html | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/emacs.d/nxhtml/tests/in/chunks.html b/emacs.d/nxhtml/tests/in/chunks.html new file mode 100644 index 0000000..62a3bf8 --- /dev/null +++ b/emacs.d/nxhtml/tests/in/chunks.html @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title></title> + <script type="text/javascript"> + // <![CDATA[ + alert ("here"); + /* + -------------------------------------------------------------------------- + Do not edit past this point unless you know what you are doing. + -------------------------------------------------------------------------- + ===== BUG: THIS LINE IS BLACK ========== + ===== BUG: THIS LINE IS BLACK ========== + */ + + addEvent(window, 'load', spamSpan); + + function spamSpan() { + var allSpamSpans = getElementsByClass(spamSpanMainClass, document, 'span'); + for (var i = 0; i < allSpamSpans.length; i++) { + // get data + var user = getSpanValue(spamSpanUserClass, allSpamSpans[i]); + var domain = getSpanValue(spamSpanDomainClass, allSpamSpans[i]); + var anchorText = getSpanValue(spamSpanAnchorTextClass, allSpamSpans[i]); + // prepare parameter data + var paramValues = new Array(); + for (var j = 0; j < spamSpanParams.length; j++) { + var paramSpanValue = getSpanValue(spamSpanParams[j], allSpamSpans[i]); + if (paramSpanValue) { + paramValues.push(spamSpanParams[j] + '=' + + encodeURIComponent(paramSpanValue)); + } + } + // create new anchor tag + var at = String.fromCharCode(32*2); + var email = cleanSpan(user) + at + cleanSpan(domain); + var anchorTagText = document.createTextNode(anchorText ? anchorText : email); + var mto = String.fromCharCode(109,97,105,108,116,111,58); + var hrefAttr = mto + email; + hrefAttr += paramValues.length ? '?' + paramValues.join('&') : ''; + var anchorTag = document.createElement('a'); + anchorTag.className = spamSpanMainClass; + anchorTag.setAttribute('href', hrefAttr); + anchorTag.appendChild(anchorTagText); + // replace the span with anchor + allSpamSpans[i].parentNode.replaceChild(anchorTag, allSpamSpans[i]); + } + } + // ]]> + </script> + <style type="text/css" media="all"> + /* <![CDATA[ */ + body { + margin-left: 1px; + /* ]]> */ + </style> + + </head> + <body> + </body> +</html> |