-
Notifications
You must be signed in to change notification settings - Fork 2
/
bc.html
194 lines (154 loc) · 8.11 KB
/
bc.html
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!--
Bookmark Commander by Tom J Demuyt is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license are available by contacting konijn@gmail.com
-->
<!DOCTYPE hmtl>
<html>
<head>
<title> Bookmark Commander </title>
<meta http-equiv="content-type" content="text/html; charset=utf8">
<meta name="Author" content="Tom J Demuyt">
<meta name="Keywords" content="Bookmarks">
<script type="text/javascript" src="jquery.1.6.js"></script>
<script language="JavaScript">
//Not sure whether this should be in bc.js or here..
var screenwidth = 120;
var panelwidth = ( screenwidth - 4 ) / 2
var panelheight = 30
var doublebar = "═"
</script>
<!-- My humps, my humps, scripts, I mean scripts ;) -->
<script type="text/javascript" src="bc.js"></script>
<script type="text/javascript" src="commander.js"></script>
<script type="text/javascript" src="bookmarks.js"></script>
<script type="text/javascript" src="viewer.js"></script>
<script type="text/javascript" src="editor.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript" src="mouse.js"></script>
<script type="text/javascript" src="options.js"></script>
<!-- Keymaps must be the last non-3rd-party script, it modifies the var in the prior scripts -->
<script type="text/javascript" src="keymaps.js"></script>
<link type="text/css" rel="stylesheet" href="bc.css" />
<!-- "You are free to use this in any way you want" license -->
<script type="text/javascript" src="js/beautify.js" ></script>
<script type="text/javascript" src="js/beautify-html.js" ></script>
<script type="text/javascript" src="js/tests/sanitytest.js" ></script>
<script type="text/javascript" src="js/tests/beautify-tests.js" ></script>
<script type="text/javascript" src="js/unpackers/javascriptobfuscator_unpacker.js" ></script>
<script type="text/javascript" src="js/unpackers/urlencode_unpacker.js" ></script>
<script type="text/javascript" src="js/unpackers/p_a_c_k_e_r_unpacker.js" ></script>
<script type="text/javascript" src="js/unpackers/myobfuscate_unpacker.js" ></script>
</head>
<body style="font-family: Vera;" onmousewheel="return mouse.scroll(evt)">
<div id="glasspane" style="position:absolute; display: none; z-index:3;width:100%;height:100%"></div><pre><script>
/* These codes were retrieved from http://www.utf8-chartable.de/unicode-utf8-table.pl ( box drawing )
┌─┬─┐ ╔═╦═╗
├─┼─┤ ╠═╬═╣
│ │ │ ║ ║ ║
└─┴─┘ ╚═╩═╝
*/
// EVIL Mac Fix
if( navigator.userAgent.has( "Mac" ) )
doublebar = '=';
//Menu
//Note the relative position and z-index, without this the dropdown would overlap the menu
//and menu events would not trigger
document.writeln( "<span id='menu' class='menu' style='position:relative;z-index:2'>" + (" Left File Command Options Right").extend() + "</span>" );
//Box Top, missing span here !, it's below now to fill up white spots
document.writeln( "<span class='border'><span id='h1'><span id='leftroot'></span><span id='riteroot'></span></span>" );
//Entries
for( var counter = 0 ; counter < panelheight ; counter++ )
{
document.write( "║<span id='left" + counter + "' class='border'>" + " ".repeat(panelwidth) + "</span>║" );
document.writeln( "║<span id='rite" + counter + "' class='border'>" + " ".repeat(panelwidth) + "</span>║" );
}
//Box Bottom
document.writeln( "<span id='h2'>╠" + "═".repeat(panelwidth) + "╩╩" + "═".repeat(panelwidth) + "╣</span>" );
document.writeln( "║<span id='url'>" + " ".repeat((panelwidth+1)*2) + "</span>║" );
document.writeln( "<span id='h3'>╚" + "═".repeat((panelwidth+1)*2) + "╝" + "</span></span>" );
var function_keys =
[
{ id : 1 , description : "Help " },
{ id : 2 , description : "Mirror" },
{ id : 3 , description : "View " },
{ id : 4 , description : "Edit " },
{ id : 5 , description : "Copy " },
{ id : 6 , description : "Move " },
{ id : 7 , description : "Mkdir " },
{ id : 8 , description : "Delete" },
{ id : 9 , description : "PullDn" },
{ id : 10 , description : "Quit " },
];
for( key in function_keys )
{
var f = function_keys[key];
document.write( "<span class='fcode'>F" + f.id + "</span><span class='menu' id='f" + f.id + "'>" + f.description + "</span><span class='fcode'> </span>" );
}
document.writeln( "<span id='end' class='fcode'>" + " ".repeat( screenwidth - 91 ) + "</span>" );
</script>
<div id="dropdown" style="position: absolute; top: 8px ; left : 0px;margin: 0px 0px 0px 0px; display: none;z-index:1">
<pre style='margin: 0px 0px 0px 0px'>
<hidden>XX</hidden><span class="menu">╔════════════════════╗</span>
<hidden>XX</hidden><span class="menu">║Re-scan ║</span>
<hidden>XX</hidden><span class="menu">║Info ║</span>
<hidden>XX</hidden><span class="menu">║Sort by date ║</span>
<hidden>XX</hidden><span class="menu">║Sort by length ║</span>
<hidden>XX</hidden><span class="menu">║Sort alphabetically ║</span>
<hidden>XX</hidden><span class="menu">╚════════════════════╝</span>
</pre>
</div>
<!-- This gets later enhanced in options.js , this looks terible on Mac and good on Windows, I know..-->
<!-- Also, changing this MUST be followed by reviewing options.init() in options.js -->
<div id="options" class="options" style="position: absolute; top: 8px ; left : 0px;margin: 0px 0px 0px 0px; display: none;z-index:4"><pre style='margin: 0px 0px 0px 0px'
>╔═ Options ══════════════════════════════════╗
║ Always Ask Ctrl Key ║
║ Recursive Sorting ( ) ( ) (x) ║
║ Recursive Copying ( ) ( ) (x) ║
╠════════════════════════════════════════════╣
║ Use Trashcan [ ] ║
╠════════════════════════════════════════════╣
║ [<OK>] [ Cancel ] ║
╚════════════════════════════════════════════╝</pre></div>
<!-- the abused glass pane to block events -->
</body>
<script>
$(document).ready(function () {
commander.boot()
menu.init();
/* EVIL Mac Fix */
if( navigator.userAgent.has( "Mac" ) )
{
//Replace ═ with =, cause silly Mac OS
$("#h2").text( function(index, oldtext) { return oldtext.replace( /═/gi , "=" ) });
$("#h3").text( function(index, oldtext) { return oldtext.replace( /═/gi , "=" ) });
$("#options").text( function(index, oldtext) { return oldtext.replace( /═/gi , "=" ) });
}
/* most anything happens here, definitely all the stuff with keymaps */
$(document).keydown( function( event )
{
//document.getElementById("end").innerHTML = ("Key: " + event.which).extend( screenwidth - 91 );
if( key_mapping.escape && event.which != 27)
{
if( escape_mapping[ event.which ] )
event.which = escape_mapping[ event.which ];
}
//Remember whether we presssed escape for the next time
key_mapping.escape = ( event.which == 27 );
if( key_mapping[ event.which ] )
{
key_mapping[ event.which ]( event );
return false;
}
return true;
});
/* Cleaning of js code and other salient stuff happens here */
$(document).keyup( function( event )
{
if( commander.editing )
editor.considerTextAreas();
});
/* Evil mouse code*/
mouse.init();
});
</script>
</html>