Changeset 17166 for lang/javascript/vimperator-plugins/trunk
- Timestamp:
- 08/06/08 18:07:41 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/auto_detect_link.js
r17111 r17166 35 35 // (次|前)っぽいURIを捏造してそこに移動します。 36 36 // 37 // example: 38 // :js liberator.globalVariables.autoDetectLink = {nextPatterns: [/next/, /次/]} 39 // 37 40 // Function: 38 41 // (次|前)へのリンクを検出する。 … … 41 44 // setting: 設定を一時的に上書きする。省略可。 42 45 // return: リンクのURIなどを含んだオブジェクト 43 // uri: アドレス。 44 // text: リンクテキストなど。 45 // frame: リンクの存在するフレームの Window オブジェクト。 46 // uri: アドレス。 47 // text: リンクテキストなど 48 // frame: リンクの存在するフレームの Window オブジェクト 49 // element: リンクの要素 46 50 // 47 51 // (次|前)へのリンクに移動。 … … 241 245 // 要素が表示されているか? 242 246 function isVisible (element) { 243 return !(element.style && element.style.display.match(/none/)) && (!element.parentNode || isVisible(element.parentNode)) 247 try { 248 let st = content.document.defaultView.getComputedStyle(element, null); 249 return !(st.display && st.display.match(/none/)) && (!element.parentNode || isVisible(element.parentNode)) 250 } catch { 251 return true; 252 } 244 253 } 245 254
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)