Add sharelatex
This commit is contained in:
parent
be597ae4ad
commit
c2b28a534c
|
@ -31,7 +31,7 @@
|
|||
<div class="row row-offcanvas row-offcanvas-right">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<div class="row divMarginBot">
|
||||
<div class="col-xs-12 col-sm-6 col-md-4" style="display:none;" >
|
||||
<div class="col-xs-12 col-sm-6 col-md-4 services">
|
||||
<div class="center-block">
|
||||
<center>
|
||||
<a class="btn btn-default" href="https://latex.rdrive.ovh/"><img src="images/latex.png" class="img-responsive" id="img_latex"></a>
|
||||
|
|
|
@ -51,3 +51,66 @@ var eggSwitchHot = new Egg("h,o,t", function() {
|
|||
var eggSaveDefaultHot = new Egg("s,e,x,y", function() {
|
||||
isNowHot = setDefaultImg(isNowHot);
|
||||
}).listen();
|
||||
|
||||
|
||||
|
||||
function EggClick(n, f) {
|
||||
var egg;
|
||||
this.i = 0;
|
||||
this.f = f;
|
||||
this.clickNumber = n;
|
||||
this.nextClick = nextClick;
|
||||
this.endLongClick = endLongClick;
|
||||
this.reinitState = reinitState;
|
||||
|
||||
$(".egg").click(function() {
|
||||
egg.nextClick();
|
||||
});
|
||||
|
||||
var pressTimer;
|
||||
$(".egg").mouseup(function(){
|
||||
clearTimeout(pressTimer);
|
||||
return false;
|
||||
}).mousedown(function(){
|
||||
pressTimer = window.setTimeout(function() {
|
||||
egg.endLongClick();
|
||||
},
|
||||
2000)
|
||||
return false;
|
||||
});
|
||||
|
||||
$("body").click(function(e) {
|
||||
if (!$(e.target).hasClass('egg')) {
|
||||
egg.reinitState();
|
||||
}
|
||||
});
|
||||
egg = this;
|
||||
}
|
||||
|
||||
function nextClick () {
|
||||
if(this.i < this.clickNumber )
|
||||
this.i += 1;
|
||||
else
|
||||
this.reinitState();
|
||||
}
|
||||
|
||||
function endLongClick () {
|
||||
if(this.i == this.clickNumber)
|
||||
this.f();
|
||||
else
|
||||
this.reinitState();
|
||||
}
|
||||
|
||||
function reinitState () {
|
||||
this.i = 0;
|
||||
}
|
||||
|
||||
|
||||
var eggSwitchHotClick = new EggClick("3", function() {
|
||||
isNowHot = switchImg(isNowHot);
|
||||
});
|
||||
|
||||
var eggSaveDefaultHot = new EggClick("5", function() {
|
||||
isNowHot = setDefaultImg(isNowHot);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue