Fossil SCM
Minor code cleanups and comment updates.
Commit
d17b59763e63e636b86f0bdb0731ea69e7f9f55bda07d21d40abcc7bb1ca440f
Parent
8773bb88a48ced0…
1 file changed
+2
-10
+2
-10
| --- src/fossil.diff.js | ||
| +++ src/fossil.diff.js | ||
| @@ -21,15 +21,11 @@ | ||
| 21 | 21 | function resetToggles(){ |
| 22 | 22 | var cb = document.querySelectorAll( |
| 23 | 23 | 'input[type="checkbox"].diff-toggle:not(:checked)'); |
| 24 | 24 | for( var i=0; i<cb.length; i++ ) cb[i].checked = true; |
| 25 | 25 | } |
| 26 | - if( window.requestIdleCallback ){ | |
| 27 | - window.requestIdleCallback(resetToggles); | |
| 28 | - }else{ | |
| 29 | - setTimeout(resetToggles); | |
| 30 | - } | |
| 26 | + setTimeout(resetToggles); | |
| 31 | 27 | }); |
| 32 | 28 | |
| 33 | 29 | /* |
| 34 | 30 | ** Diff keyboard navigation shortcuts: |
| 35 | 31 | ** |
| @@ -39,28 +35,24 @@ | ||
| 39 | 35 | ** |
| 40 | 36 | ** o The `timeline-keyboard-navigation' branch removes the unload handler from |
| 41 | 37 | ** pages containing timeline snippets, so it's no longer necessary to reset |
| 42 | 38 | ** the diff toggles on back/forward navigation in case the mentioned branch |
| 43 | 39 | ** is merged with `diff-keyboard-navigation'. |
| 44 | -** o The `diff-toggle' class was renamed to `toggle-diff' in my private Fossil | |
| 45 | -** patches to simplify completeness tests with my IE-compatible builds. | |
| 46 | 40 | */ |
| 47 | 41 | (function(){ |
| 48 | 42 | window.addEventListener('load',function(){ |
| 49 | 43 | function btnScrollIntoView(e){ |
| 50 | - //setTimeout(function(){ | |
| 51 | 44 | e = e.parentElement; |
| 52 | 45 | var rc = e.getBoundingClientRect(); |
| 53 | 46 | var y = 0; |
| 54 | 47 | do{ |
| 55 | 48 | y += e.offsetTop; |
| 56 | 49 | }while( e = e.offsetParent ); |
| 57 | 50 | window.scrollTo(0,y-6*rc.height); |
| 58 | - //},0); | |
| 59 | 51 | } |
| 60 | 52 | document.addEventListener('keydown',function(evt){ |
| 61 | - //if( evt.target.tagName=='INPUT' || evt.target.tagName=='SELECT' ) return; | |
| 53 | + if( evt.target.tagName=='INPUT' || evt.target.tagName=='SELECT' ) return; | |
| 62 | 54 | var |
| 63 | 55 | mSHIFT = 1<<13, |
| 64 | 56 | kSHOW = mSHIFT | 73 /* SHIFT+I */, |
| 65 | 57 | kHIDE = 73 /* I */, |
| 66 | 58 | kNEXT = 80 /* P */, |
| 67 | 59 |
| --- src/fossil.diff.js | |
| +++ src/fossil.diff.js | |
| @@ -21,15 +21,11 @@ | |
| 21 | function resetToggles(){ |
| 22 | var cb = document.querySelectorAll( |
| 23 | 'input[type="checkbox"].diff-toggle:not(:checked)'); |
| 24 | for( var i=0; i<cb.length; i++ ) cb[i].checked = true; |
| 25 | } |
| 26 | if( window.requestIdleCallback ){ |
| 27 | window.requestIdleCallback(resetToggles); |
| 28 | }else{ |
| 29 | setTimeout(resetToggles); |
| 30 | } |
| 31 | }); |
| 32 | |
| 33 | /* |
| 34 | ** Diff keyboard navigation shortcuts: |
| 35 | ** |
| @@ -39,28 +35,24 @@ | |
| 39 | ** |
| 40 | ** o The `timeline-keyboard-navigation' branch removes the unload handler from |
| 41 | ** pages containing timeline snippets, so it's no longer necessary to reset |
| 42 | ** the diff toggles on back/forward navigation in case the mentioned branch |
| 43 | ** is merged with `diff-keyboard-navigation'. |
| 44 | ** o The `diff-toggle' class was renamed to `toggle-diff' in my private Fossil |
| 45 | ** patches to simplify completeness tests with my IE-compatible builds. |
| 46 | */ |
| 47 | (function(){ |
| 48 | window.addEventListener('load',function(){ |
| 49 | function btnScrollIntoView(e){ |
| 50 | //setTimeout(function(){ |
| 51 | e = e.parentElement; |
| 52 | var rc = e.getBoundingClientRect(); |
| 53 | var y = 0; |
| 54 | do{ |
| 55 | y += e.offsetTop; |
| 56 | }while( e = e.offsetParent ); |
| 57 | window.scrollTo(0,y-6*rc.height); |
| 58 | //},0); |
| 59 | } |
| 60 | document.addEventListener('keydown',function(evt){ |
| 61 | //if( evt.target.tagName=='INPUT' || evt.target.tagName=='SELECT' ) return; |
| 62 | var |
| 63 | mSHIFT = 1<<13, |
| 64 | kSHOW = mSHIFT | 73 /* SHIFT+I */, |
| 65 | kHIDE = 73 /* I */, |
| 66 | kNEXT = 80 /* P */, |
| 67 |
| --- src/fossil.diff.js | |
| +++ src/fossil.diff.js | |
| @@ -21,15 +21,11 @@ | |
| 21 | function resetToggles(){ |
| 22 | var cb = document.querySelectorAll( |
| 23 | 'input[type="checkbox"].diff-toggle:not(:checked)'); |
| 24 | for( var i=0; i<cb.length; i++ ) cb[i].checked = true; |
| 25 | } |
| 26 | setTimeout(resetToggles); |
| 27 | }); |
| 28 | |
| 29 | /* |
| 30 | ** Diff keyboard navigation shortcuts: |
| 31 | ** |
| @@ -39,28 +35,24 @@ | |
| 35 | ** |
| 36 | ** o The `timeline-keyboard-navigation' branch removes the unload handler from |
| 37 | ** pages containing timeline snippets, so it's no longer necessary to reset |
| 38 | ** the diff toggles on back/forward navigation in case the mentioned branch |
| 39 | ** is merged with `diff-keyboard-navigation'. |
| 40 | */ |
| 41 | (function(){ |
| 42 | window.addEventListener('load',function(){ |
| 43 | function btnScrollIntoView(e){ |
| 44 | e = e.parentElement; |
| 45 | var rc = e.getBoundingClientRect(); |
| 46 | var y = 0; |
| 47 | do{ |
| 48 | y += e.offsetTop; |
| 49 | }while( e = e.offsetParent ); |
| 50 | window.scrollTo(0,y-6*rc.height); |
| 51 | } |
| 52 | document.addEventListener('keydown',function(evt){ |
| 53 | if( evt.target.tagName=='INPUT' || evt.target.tagName=='SELECT' ) return; |
| 54 | var |
| 55 | mSHIFT = 1<<13, |
| 56 | kSHOW = mSHIFT | 73 /* SHIFT+I */, |
| 57 | kHIDE = 73 /* I */, |
| 58 | kNEXT = 80 /* P */, |
| 59 |