8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/info and similar pages.
*/
const D = window.fossil.dom;
const addToggle = function(diffElem){
const sib = diffElem.previousElementSibling,
btn = sib ? D.addClass(D.checkbox(true), 'diff-toggle') : 0;
if(!sib) return;
D.append(sib,btn);
btn.addEventListener('click', function(){
diffElem.classList.toggle('hidden');
}, false);
};
document.querySelectorAll('table.diff').forEach(addToggle);
});
|
>
>
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/info and similar pages.
*/
const D = window.fossil.dom;
const addToggle = function(diffElem){
const sib = diffElem.previousElementSibling,
btn = sib ? D.addClass(D.checkbox(true), 'diff-toggle') : 0;
if(!sib) return;
D.attr(btn,'aria-label','Toggle Diff')
D.attr(btn,'title','Toggle Diff')
D.append(sib,btn);
btn.addEventListener('click', function(){
diffElem.classList.toggle('hidden');
}, false);
};
document.querySelectorAll('table.diff').forEach(addToggle);
});
|
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
|
*/
window.fossil.onPageLoad(function(){
const SCROLL_LEN = 25;
const F = window.fossil, D = F.dom, Diff = F.diff;
var lastWidth;
Diff.checkTableWidth = function f(force){
if(undefined === f.contentNode){
f.contentNode = document.querySelector('div.content');
}
force = true;
const parentCS = window.getComputedStyle(f.contentNode);
const parentWidth = (
//document.body.clientWidth;
//parentCS.width;
f.contentNode.clientWidth
|
|
|
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
|
*/
window.fossil.onPageLoad(function(){
const SCROLL_LEN = 25;
const F = window.fossil, D = F.dom, Diff = F.diff;
var lastWidth;
Diff.checkTableWidth = function f(force){
if(undefined === f.contentNode){
f.contentNode = document.querySelector('main.content');
}
force = true;
const parentCS = window.getComputedStyle(f.contentNode);
const parentWidth = (
//document.body.clientWidth;
//parentCS.width;
f.contentNode.clientWidth
|