|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
// (find-es "javascript" "spidermonkey")
// (find-angg "HTML/local-videos.js")
// (find-books "__comp/__comp.el" "javascript")
// (find-crockfordpage (+ 16 20) "Object Literals")
// (find-crockfordtext (+ 16 20) "Object Literals")
// (find-crockfordpage (+ 16 58) "Arrays")
// (find-crockfordtext (+ 16 58) "Arrays")
// (find-crockfordpage (+ 16 59) "'0': 'zero'")
// (find-crockfordtext (+ 16 59) "'0': 'zero'")
// (find-crockfordpage (+ 16 65) "Regular Expressions")
// (find-crockfordtext (+ 16 65) "Regular Expressions")
// (find-crockfordpage (+ 16 86) "regexp.exec(string)")
// (find-crockfordtext (+ 16 86) "regexp.exec(string)")
// (find-crockfordpage (+ 16 89) "string.match(regexp)")
// (find-crockfordtext (+ 16 89) "string.match(regexp)")
// (find-crockfordpage (+ 16 10) "var statements")
// (find-crockfordtext (+ 16 10) "var statements")
// (find-TH "videos-locais")
// (find-crockfordpage (+ 16 13) "for (myvar in obj)")
// (find-crockfordtext (+ 16 13) "for (myvar in obj)")
* (eepitch-smjs)
* (eepitch-kill)
* (eepitch-smjs)
time_activate("foo")
youtube_files =
"manifs/7_de_setembro-y7E5Vy0PinY.mp4\n"+
"manifs/Black_Bloc_-_o_Brasil_de_preto-cfxnZHuL-OQ.mp4\n"+
"bleh\n"+
"manifs/CA_A_IMPRENSA_NO_7_DE_SETEMBRO-T0ITOENS8qE.mp4\n"
add_mp4s(youtube_files)
youtube_mp4s
// (find-es "lua5" "video_fnames_js")
youtube_mp4s = {
'y7E5Vy0PinY': 'manifs/7_de_setembro-y7E5Vy0PinY.mp4',
'cfxnZHuL-OQ': 'manifs/Black_Bloc_-_o_Brasil_de_preto-cfxnZHuL-OQ.mp4',
'T0ITOENS8qE': 'manifs/CA_A_IMPRENSA_NO_7_DE_SETEMBRO-T0ITOENS8qE.mp4'
}
li = "http://www.youtube.com/watch?v=y7E5Vy0PinY 7/set"
// youtube_line_parse(li)
youtube_line(li)
li = "http://www.youtube.com/watch?v=y7e5vy0piny 7/set"
youtube_line(li)
// ^^^^^^^^^^ WORKS!
// activate time links
href0 = function (tgt, text) { return '<a href="'+tgt+'">' + text + '</a>'; }
href = function (tgt, text) { return tgt ? href0(tgt, text) : text; }
jref = function (code, text) { return href('javascript:'+code, text); }
mkpla = function (time) { return jref("pla('"+time+"')", time); }
time_re = /[0-9]?[0-9]:[0-9][0-9](:[0-9][0-9])?/;
time_activate = function (id, mkpl) {
var elt = document.getElementById(id);
elt.innerHTML = elt.innerText.replace(time_re, (mkpl || mkpla));
}
time_activate("foo")
escape_table = {
'&': '&',
'<': '<',
'>': '>',
'"': '"',
"'": '''
}
escape_c = function (c) { return escape_table[c] || c; }
escape = function (str) { return str.replace(/[&<>"']/g, escape_c); }
// mkpla("1:23")
// --> "<a href=\"javascript:pla('1:23')\">1:23</a>"
// (find-TH "html5-audio")
// (find-fline "~/TH/L/" "html5-audio")
// (find-fline "~/TH/L/html5-audio.html")
// (find-angg "HTML/local-videos.js")
id = "foo";
elt = document.getElementById(id)
text = elt.innerText
newtext = text.replace(time_re, mkpla)
elt.innerHTML = newtext
// mkpla('1:23')
aa = {'a':22, 'b':33}
bb = {'A':22, 'B':33, 'prototype':aa}
bb.A
bb.a
var a, b, c
var a = 22, b = 33, c = 44
youtube_hash(u)
youtube_hash("")
(str.match(youtube_hash_re) || [])[1]; }
[] || 99
null || 99
re = youtube_hash_re
u = "http://www.youtube.com/watch?v=KTWc3Eo_CpI Direitos Humanos e a Guerr"
u.match(re)
youtube_hash(u)
"boo".match(re)
a = u.match(re)
var A = u.match(re)
A
a && a[1]
A = []
A.b = 22
A
A.b
A = {a:22}
A.a
B = {a:22; b:33}
B.a
B.b
[a:22]
A =
// a = document.getElementById("a")
// b = document.getElementById("b")
b.innerHTML
b.innerText
a.innerHTML = b.innerHTML
t = 'foo <a href="c">d</a>'
a.innerHTML = t
t.substr(1, 2)
t.substr(1, 2) = 'qqq'
t[1]
t[1, 2]
t[1, 3]
t[1, 2]
t[1..2]
t
t.replace(/o/, "O")
f = function (s) { return "EE"; }
f("a")
t.replace(/o/, f)
f = function (s) { return s+"EE"; }
f("a")
t.replace(/o/, f)