-
Notifications
You must be signed in to change notification settings - Fork 2
/
framescript.js
33 lines (22 loc) · 874 Bytes
/
framescript.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
alert("po");
var shifted =false;
ts = new TextSelector();
$("body").eq(0).keydown(function(e){
switch (e.charCode) {
case 60:
// <
window.parent.showMessage("Tag Opened");
sel = ts.getSelectedText();
kidlen=$(sel.StartParent).children().length;
output = $("body", d).html();
start = output.substring(0,sel.StartOffset);
end = output.substring(sel.StartOffset);
middle = "<span class='tag'><</span>";
node.html(start+middle+end);
break;
case 62:
// <
window.parent.showMessage("Tag Closed");
break;
}
});