ui.hoverend
This commit is contained in:
parent
fe0bbb842f
commit
6287bdc4dd
17
4chan_x.js
17
4chan_x.js
@ -234,6 +234,9 @@
|
|||||||
bot = top + height;
|
bot = top + height;
|
||||||
el.style.top = ui.winHeight < height || top < 0 ? '0px' : bot > ui.winHeight ? ui.winHeight - height + 'px' : top + 'px';
|
el.style.top = ui.winHeight < height || top < 0 ? '0px' : bot > ui.winHeight ? ui.winHeight - height + 'px' : top + 'px';
|
||||||
return el.style.left = clientX + 45;
|
return el.style.left = clientX + 45;
|
||||||
|
},
|
||||||
|
hoverend: function(e) {
|
||||||
|
return $.hide(ui.el);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
d = document;
|
d = document;
|
||||||
@ -1684,7 +1687,7 @@
|
|||||||
quote = _ref[_i];
|
quote = _ref[_i];
|
||||||
$.bind(quote, 'mouseover', quotePreview.mouseover);
|
$.bind(quote, 'mouseover', quotePreview.mouseover);
|
||||||
$.bind(quote, 'mousemove', ui.hover);
|
$.bind(quote, 'mousemove', ui.hover);
|
||||||
_results.push($.bind(quote, 'mouseout', quotePreview.mouseout));
|
_results.push($.bind(quote, 'mouseout', ui.hoverend));
|
||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
},
|
},
|
||||||
@ -1710,9 +1713,6 @@
|
|||||||
$.show(qp);
|
$.show(qp);
|
||||||
return ui.el = qp;
|
return ui.el = qp;
|
||||||
},
|
},
|
||||||
mouseout: function(e) {
|
|
||||||
return $.hide(ui.el);
|
|
||||||
},
|
|
||||||
get: function(id, threadID, innerHTML) {
|
get: function(id, threadID, innerHTML) {
|
||||||
var body, html, reply, _i, _len, _ref;
|
var body, html, reply, _i, _len, _ref;
|
||||||
body = $.el('body', {
|
body = $.el('body', {
|
||||||
@ -1930,24 +1930,19 @@
|
|||||||
thumb = _ref2[_i];
|
thumb = _ref2[_i];
|
||||||
$.bind(thumb, 'mouseover', imageHover.cb.mouseover);
|
$.bind(thumb, 'mouseover', imageHover.cb.mouseover);
|
||||||
$.bind(thumb, 'mousemove', ui.hover);
|
$.bind(thumb, 'mousemove', ui.hover);
|
||||||
_results.push($.bind(thumb, 'mouseout', imageHover.cb.mouseout));
|
_results.push($.bind(thumb, 'mouseout', ui.hoverend));
|
||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
},
|
},
|
||||||
mouseover: function(e) {
|
mouseover: function(e) {
|
||||||
var el;
|
var el;
|
||||||
el = $('#iHover');
|
el = $('#iHover');
|
||||||
|
el.src = null;
|
||||||
el.src = this.parentNode.href;
|
el.src = this.parentNode.href;
|
||||||
$.show(el);
|
$.show(el);
|
||||||
ui.el = el;
|
ui.el = el;
|
||||||
ui.winHeight = d.body.clientHeight;
|
ui.winHeight = d.body.clientHeight;
|
||||||
return ui.winWidth = d.body.clientWidth;
|
return ui.winWidth = d.body.clientWidth;
|
||||||
},
|
|
||||||
mouseout: function(e) {
|
|
||||||
var el;
|
|
||||||
el = ui.el;
|
|
||||||
$.hide(el);
|
|
||||||
return el.src = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -156,6 +156,8 @@ ui =
|
|||||||
else
|
else
|
||||||
top + 'px'
|
top + 'px'
|
||||||
el.style.left = clientX + 45
|
el.style.left = clientX + 45
|
||||||
|
hoverend: (e) ->
|
||||||
|
$.hide ui.el
|
||||||
|
|
||||||
#convenience
|
#convenience
|
||||||
d = document
|
d = document
|
||||||
@ -1345,7 +1347,7 @@ quotePreview =
|
|||||||
for quote in $$ 'a.quotelink', root
|
for quote in $$ 'a.quotelink', root
|
||||||
$.bind quote, 'mouseover', quotePreview.mouseover
|
$.bind quote, 'mouseover', quotePreview.mouseover
|
||||||
$.bind quote, 'mousemove', ui.hover
|
$.bind quote, 'mousemove', ui.hover
|
||||||
$.bind quote, 'mouseout', quotePreview.mouseout
|
$.bind quote, 'mouseout', ui.hoverend
|
||||||
mouseover: (e) ->
|
mouseover: (e) ->
|
||||||
id = @textContent.replace ">>", ''
|
id = @textContent.replace ">>", ''
|
||||||
qp = $ '#qp'
|
qp = $ '#qp'
|
||||||
@ -1364,8 +1366,6 @@ quotePreview =
|
|||||||
)
|
)
|
||||||
$.show qp
|
$.show qp
|
||||||
ui.el = qp
|
ui.el = qp
|
||||||
mouseout: (e) ->
|
|
||||||
$.hide ui.el
|
|
||||||
get: (id, threadID, innerHTML) ->
|
get: (id, threadID, innerHTML) ->
|
||||||
body = $.el 'body', {innerHTML}
|
body = $.el 'body', {innerHTML}
|
||||||
|
|
||||||
@ -1501,18 +1501,15 @@ imageHover =
|
|||||||
for thumb in $$ 'img[md5]', root
|
for thumb in $$ 'img[md5]', root
|
||||||
$.bind thumb, 'mouseover', imageHover.cb.mouseover
|
$.bind thumb, 'mouseover', imageHover.cb.mouseover
|
||||||
$.bind thumb, 'mousemove', ui.hover
|
$.bind thumb, 'mousemove', ui.hover
|
||||||
$.bind thumb, 'mouseout', imageHover.cb.mouseout
|
$.bind thumb, 'mouseout', ui.hoverend
|
||||||
mouseover: (e) ->
|
mouseover: (e) ->
|
||||||
el = $ '#iHover'
|
el = $ '#iHover'
|
||||||
|
el.src = null
|
||||||
el.src = @parentNode.href
|
el.src = @parentNode.href
|
||||||
$.show el
|
$.show el
|
||||||
ui.el = el
|
ui.el = el
|
||||||
ui.winHeight = d.body.clientHeight
|
ui.winHeight = d.body.clientHeight
|
||||||
ui.winWidth = d.body.clientWidth
|
ui.winWidth = d.body.clientWidth
|
||||||
mouseout: (e) ->
|
|
||||||
{el} = ui
|
|
||||||
$.hide el
|
|
||||||
el.src = null
|
|
||||||
|
|
||||||
imgPreloading =
|
imgPreloading =
|
||||||
init: ->
|
init: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user