Shortcut keys added

This commit is contained in:
Saqib Razzaq 2016-05-16 16:45:06 +05:00
parent 43c2ff997c
commit f7660d3f31

View file

@ -16,6 +16,50 @@ function headerFooter(){
//console.log($(window).height());
//console.log(cont_height);
}
function shortKeys() {
$(document).keypress(function (e) {
var key = e.which;
if (pageNow == 'index') {
if(e.which == 70 && e.shiftKey) // shift + f = featured load more
{
$('#featured_load_more').trigger("click");
}
if(e.which == 82 && e.shiftKey) // shift + r = recent load more
{
$('#recent_load_more').trigger("click");
}
}
if(e.which == 83 && e.shiftKey) // shift + s = search something
{
$('#query').focus().select();
}
if(e.which == 86 && e.shiftKey) // shift + v = videos page
{
window.location.href = baseurl+"/videos";
}
if(e.which == 80 && e.shiftKey) // shift + p = photos page
{
window.location.href = baseurl+"/photos";
}
if(e.which == 67 && e.shiftKey) // shift + c = collections page
{
window.location.href = baseurl+"/collections";
}
if(e.which == 85 && e.shiftKey) // shift + u = channel page
{
window.location.href = baseurl+"/channels";
}
});
}
var flag = 0;
function responsiveFixes(){
var WinWidth = $(window).width();
@ -338,4 +382,6 @@ $(window).resize(function(){
preLoadingBlock();
responsiveFixes();
loginHeight();
});
});
shortKeys();