Merge pull request #107 from MayhemYDG/hl
Highlight quoted post during quote preview. close #81
This commit is contained in:
commit
aa93cd8710
15
4chan_x.js
15
4chan_x.js
@ -1707,6 +1707,7 @@
|
|||||||
$.bind(link, 'mouseover', quotePreview.mouseover);
|
$.bind(link, 'mouseover', quotePreview.mouseover);
|
||||||
$.bind(link, 'mousemove', ui.hover);
|
$.bind(link, 'mousemove', ui.hover);
|
||||||
$.bind(link, 'mouseout', ui.hoverend);
|
$.bind(link, 'mouseout', ui.hoverend);
|
||||||
|
$.bind(link, 'mouseout', quotePreview.mouseout);
|
||||||
}
|
}
|
||||||
if ($.config('Quote Inline')) {
|
if ($.config('Quote Inline')) {
|
||||||
$.bind(link, 'click', quoteInline.toggle);
|
$.bind(link, 'click', quoteInline.toggle);
|
||||||
@ -1825,10 +1826,14 @@
|
|||||||
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', ui.hoverend));
|
$.bind(quote, 'mouseout', ui.hoverend);
|
||||||
|
_results.push($.bind(quote, 'mouseout', quotePreview.mouseout));
|
||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
},
|
},
|
||||||
|
mouseout: function() {
|
||||||
|
return $.removeClass(d.getElementById(this.hash.slice(1)), 'qphl');
|
||||||
|
},
|
||||||
mouseover: function(e) {
|
mouseover: function(e) {
|
||||||
var el, id, qp, req, threadID;
|
var el, id, qp, req, threadID;
|
||||||
if (!(id = this.hash.slice(1))) {
|
if (!(id = this.hash.slice(1))) {
|
||||||
@ -1837,6 +1842,7 @@
|
|||||||
qp = $('#qp');
|
qp = $('#qp');
|
||||||
if (el = d.getElementById(id)) {
|
if (el = d.getElementById(id)) {
|
||||||
qp.innerHTML = el.innerHTML;
|
qp.innerHTML = el.innerHTML;
|
||||||
|
$.addClass(el, 'qphl');
|
||||||
} else {
|
} else {
|
||||||
qp.innerHTML = "Loading " + id + "...";
|
qp.innerHTML = "Loading " + id + "...";
|
||||||
threadID = this.pathname.split('/').pop();
|
threadID = this.pathname.split('/').pop();
|
||||||
@ -2456,13 +2462,11 @@
|
|||||||
}\
|
}\
|
||||||
\
|
\
|
||||||
#navlinks {\
|
#navlinks {\
|
||||||
|
font-size: 16px;\
|
||||||
position: fixed;\
|
position: fixed;\
|
||||||
top: 25px;\
|
top: 25px;\
|
||||||
right: 5px;\
|
right: 5px;\
|
||||||
}\
|
}\
|
||||||
#navlinks {\
|
|
||||||
font-size: 16px;\
|
|
||||||
}\
|
|
||||||
\
|
\
|
||||||
#options {\
|
#options {\
|
||||||
position: fixed;\
|
position: fixed;\
|
||||||
@ -2562,6 +2566,9 @@
|
|||||||
#qp input {\
|
#qp input {\
|
||||||
display: none;\
|
display: none;\
|
||||||
}\
|
}\
|
||||||
|
.qphl {\
|
||||||
|
outline: 2px solid rgba(216, 94, 49, .7);\
|
||||||
|
}\
|
||||||
'
|
'
|
||||||
};
|
};
|
||||||
main.init();
|
main.init();
|
||||||
|
|||||||
@ -1374,6 +1374,7 @@ quoteBacklink =
|
|||||||
$.bind link, 'mouseover', quotePreview.mouseover
|
$.bind link, 'mouseover', quotePreview.mouseover
|
||||||
$.bind link, 'mousemove', ui.hover
|
$.bind link, 'mousemove', ui.hover
|
||||||
$.bind link, 'mouseout', ui.hoverend
|
$.bind link, 'mouseout', ui.hoverend
|
||||||
|
$.bind link, 'mouseout', quotePreview.mouseout
|
||||||
if $.config 'Quote Inline'
|
if $.config 'Quote Inline'
|
||||||
$.bind link, 'click', quoteInline.toggle
|
$.bind link, 'click', quoteInline.toggle
|
||||||
$.before $('td > br, blockquote', el), link
|
$.before $('td > br, blockquote', el), link
|
||||||
@ -1452,11 +1453,15 @@ quotePreview =
|
|||||||
$.bind quote, 'mouseover', quotePreview.mouseover
|
$.bind quote, 'mouseover', quotePreview.mouseover
|
||||||
$.bind quote, 'mousemove', ui.hover
|
$.bind quote, 'mousemove', ui.hover
|
||||||
$.bind quote, 'mouseout', ui.hoverend
|
$.bind quote, 'mouseout', ui.hoverend
|
||||||
|
$.bind quote, 'mouseout', quotePreview.mouseout
|
||||||
|
mouseout: ->
|
||||||
|
$.removeClass d.getElementById(@hash[1..]), 'qphl'
|
||||||
mouseover: (e) ->
|
mouseover: (e) ->
|
||||||
return unless id = @hash[1..]
|
return unless id = @hash[1..]
|
||||||
qp = $ '#qp'
|
qp = $ '#qp'
|
||||||
if el = d.getElementById id
|
if el = d.getElementById id
|
||||||
qp.innerHTML = el.innerHTML
|
qp.innerHTML = el.innerHTML
|
||||||
|
$.addClass el, 'qphl'
|
||||||
else
|
else
|
||||||
qp.innerHTML = "Loading #{id}..."
|
qp.innerHTML = "Loading #{id}..."
|
||||||
threadID = @pathname.split('/').pop()
|
threadID = @pathname.split('/').pop()
|
||||||
@ -1920,13 +1925,11 @@ main =
|
|||||||
}
|
}
|
||||||
|
|
||||||
#navlinks {
|
#navlinks {
|
||||||
|
font-size: 16px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 25px;
|
top: 25px;
|
||||||
right: 5px;
|
right: 5px;
|
||||||
}
|
}
|
||||||
#navlinks {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#options {
|
#options {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -2026,6 +2029,9 @@ main =
|
|||||||
#qp input {
|
#qp input {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
.qphl {
|
||||||
|
outline: 2px solid rgba(216, 94, 49, .7);
|
||||||
|
}
|
||||||
'
|
'
|
||||||
|
|
||||||
main.init()
|
main.init()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user