forked from ksafranski/Codiad-Terminal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.js
27 lines (20 loc) · 751 Bytes
/
init.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
/*
* Copyright (c) Codiad & Kent Safranski (codiad.com), distributed
* as-is and without warranty under the MIT License. See
* [root]/license.txt for more. This information must remain intact.
*/
(function(global, $){
var codiad = global.codiad,
scripts = document.getElementsByTagName('script'),
path = scripts[scripts.length-1].src.split('?')[0],
curpath = path.split('/').slice(0, -1).join('/')+'/';
codiad.terminal = {
path: curpath,
termWidth: $(window)
.outerWidth() - 500,
open: function() {
codiad.modal.load(this.termWidth, this.path+'dialog.php');
codiad.modal.hideOverlay();
}
};
})(this, jQuery);