A short sidebar for those unfamiliar with this particular quirk of JS:
On Sat, Nov 25, 2017 at 3:49 PM, David Mason wrote:
> node.setAttribute('title','Click to '+(expand || 'expand'));
>
In JS the || operators evaluates to the first value of its left/right sides
which itself evaluates to true
To extract the relevant bits:
HTML:
JS:
function toggleExpand(node,shrink,expand) {
if (node.classList.contains(shrink)) {
node.classList.remove(shrink);
expand && node.classList.add(expand);
node.setAttribute('title','Click to '+shrink);
} else {
expand && node.classList.remove(exp
Le 25/11/2017 à 14:53, Richard Hipp a écrit :
I notice on diff pages of GitHub (ex:
https://github.com/mackyle/sqlite/commit/028307ebcc953ee944d389fe359d146ab4893d16)
that above and below each diff chunk there is a light-blue block on
the left with an icon in the middle. If you hover over this a
1) Add/remove a class to an enclosing DIV. You can see a very simple
version that I wrote in action on https://programmingfortherestofus.com
click on the bullets under Elevator Pitch.
2) Include all the content, just don't display it by default... dynamically
downloading additional content is almo
I notice on diff pages of GitHub (ex:
https://github.com/mackyle/sqlite/commit/028307ebcc953ee944d389fe359d146ab4893d16)
that above and below each diff chunk there is a light-blue block on
the left with an icon in the middle. If you hover over this area, you
get a pop-up hint that says "Expand".
5 matches
Mail list logo