-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patharmadillo.js
28 lines (26 loc) · 876 Bytes
/
armadillo.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
$(".c-hamburger").click(function(event) {
$(".c-hamburger").toggleClass('is-active ham-trans');
$( "#sidebar" ).toggleClass('show-thing');
});
function searchInit(event){
var site = $('.searchbar').val();
if (!site.search("/http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+/i")) {
site = 'http://' + site;
}
requestUrl(site);
$('#welcome').fadeOut('100');
$('.c-hamburger').css('visibility', 'visible').hide().fadeIn('100');
$('#title').text(site);
return false;
}
function searchPost(event){
var site = $('.searchbar2').val();
if (!site.search("/http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+/i")) {
site = 'http://' + site;
}
requestUrl(site);
$('.searchbar2').val("");
$(".c-hamburger").toggleClass('is-active ham-trans');
$( "#sidebar" ).toggleClass('show-thing');
return false;
}