Changeset 17906 for lang/javascript/vimperator-plugins/trunk
- Timestamp:
- 08/19/08 21:58:19 (3 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/scroll_div.js
r17905 r17906 3 3 let re = /auto|scroll/i; 4 4 5 // FIXME!!!!!!!! Firebug では overflow になってるのに false になったりする。6 5 function isScrollable (e, doc) { 7 let s = doc.defaultView.getComputedStyle(e, null); 8 for each (let n in ['overflow', 'overflow-x', 'overflow-y']) { 9 //if (s[n] && s[n].match(/.+/)) liberator.log(n + ':' + s[n]); 10 if (s[n] && s[n].match(re)) 11 return true; 6 try { 7 let s = doc.defaultView.getComputedStyle(e, ''); 8 if (e.scrollHeight <= e.clientHeight) 9 return; 10 for each (let n in ['overflow', 'overflowY', 'overflowX']) { 11 if (s[n] && s[n].match(re)) 12 return true; 13 } 14 } catch (e) { 15 liberator.log(e); 12 16 } 13 17 } … … 44 48 } 45 49 46 liberator.log( result.length);50 liberator.log('scrollableElements: ' + result.length); 47 51 return result; 48 52 } … … 62 66 let es = scrollableElements(); 63 67 let idx = content.document.__div_scroller_index || 0; 64 liberator.log("idx: " + idx);65 68 return es[idx]; 66 69 } … … 71 74 if (elem) 72 75 elem.scrollTop += dy; 73 //for each (let elem in scrollableElements()) 76 //for each (let elem in scrollableElements()) { 77 // liberator.log(elem.tagName); 78 // liberator.log(elem.id); 74 79 // elem.scrollTop += dy; 80 //} 75 81 } 76 82 … … 89 95 ); 90 96 97 scroll(100); 91 98 92 99
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)