-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvoyage.js
25 lines (23 loc) · 994 Bytes
/
voyage.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
function voyage_update_options() {
var dokomade = document.getElementById( 'dokomade' ).value;
var destination = '/yad/';
if( dokomade.size != 0 ) {
if( dokomade.match(/^\d-\d+-\d+$/) || dokomade.match(/^\d+$/) )
destination = '/sk/';
else if( dokomade.match(/^\d-\d+-\d+\+\d-\d+-\d+$/) )
destination = '/biskip/';
else if( dokomade.match(/^\d+-\d+$/) || dokomade.match(/^\d-\d+-\d+-\d-\d+-\d+$/) )
destination = '/sk/';
else if( dokomade.match(/^http/) )
destination = '/proxy/';
else if( dokomade.match(/\+|&/) )
destination = '/slook/';
else
destination = '/yad/';
window.location = destination + dokomade;
};
};
addEventListener("load", function(){
document.getElementById( 'content' ).style.marginTop= document.getElementsByClassName('bar')[0].offsetHeight;
document.getElementById( 'content' ).style.width= '100%';
}, false);