Changeset 9360
- Timestamp:
- 04/13/08 00:17:09 (8 months ago)
- Location:
- lang/javascript/jsAutoPageScraper/trunk
- Files:
-
- 4 modified
-
index.html (modified) (2 diffs)
-
js/jsAutoPageScraper.js (modified) (16 diffs)
-
js/scriptLoader.js (modified) (2 diffs)
-
test/jsAutoPageScraper-test.js (modified) (40 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/jsAutoPageScraper/trunk/index.html
r9343 r9360 10 10 <script type="text/javascript"> 11 11 var baseUrl = location.href.split('/').slice(0,-1).join('/'); 12 var bookmarkletScriptSrc = 13 "javascript:(function(u ){var s=document.createElement('script');s.type='text/javascript';s.src=u;document.getElementsByTagName('head')[0].appendChild(s)})('"+baseUrl+"/js/jsAutoPageScraper.js')"12 var bookmarkletScriptSrc = 13 "javascript:(function(u,d,s){s=d.createElement('script');s.type='text/javascript';s.src=u;d.documentElement.appendChild(s)})('"+baseUrl+"/js/jsAutoPageScraper.js',document)" 14 14 document.write('<a href="'+bookmarkletScriptSrc+'">load jsAutoPageScraper</a>'); 15 15 </script> … … 17 17 <li> 18 18 <script type="text/javascript"> 19 bookmarkletScriptSrc = 20 "javascript:(function(u ){var s=document.createElement('script');s.type='text/javascript';s.src=u;document.getElementsByTagName('head')[0].appendChild(s)})('"+baseUrl+"/js/scriptLoader.js#jsAutoPageScraper.js,../test/jsAutoPageScraper-test.js:JSAutoPageScraper')"19 bookmarkletScriptSrc = 20 "javascript:(function(u,d,s){s=d.createElement('script');s.type='text/javascript';s.src=u;d.documentElement.appendChild(s)})('"+baseUrl+"/js/scriptLoader.js#jsAutoPageScraper.js,../test/jsAutoPageScraper-test.js:JSAutoPageScraper',document)" 21 21 document.write('<a href="'+bookmarkletScriptSrc+'">jsAutoPageScraper Test</a>'); 22 22 </script> -
lang/javascript/jsAutoPageScraper/trunk/js/jsAutoPageScraper.js
r9343 r9360 7 7 * For details, see the jsAutoPageScraper web site: http://www.mashmarix.com 8 8 * 9 * */9 */ 10 10 11 11 … … 22 22 23 23 function getScriptCtEl() { 24 return scriptCtEl || 24 return scriptCtEl || 25 25 (scriptCtEl = windoc.getElementsByTagName('head')[0] || getBodyEl()); 26 26 } … … 47 47 * Create hidden(invisible) iframe in order to scrape contents from DOM tree 48 48 * 49 * @param url - urlpath to scrape49 * @param url - URL path to scrape 50 50 * @param callback - callback function, invoked when iframe document load complete 51 51 * @param scope - scope object to be applied in callback … … 53 53 function createIframe(url, callback, scope) { 54 54 // ugly W/A to prevent cache... 55 if (url==window.location.href) { 55 if (url==window.location.href) { 56 56 url += url.indexOf('?')>=0 ? '&' : '?'; 57 57 } … … 72 72 73 73 74 // detect base url from own script url74 // detect base URL from own script URL 75 75 var baseUrl = (function() { 76 76 var scripts = windoc.getElementsByTagName('script'); … … 81 81 })(); 82 82 83 // assuming javascript-xpath lib is located in following path :83 // assuming JavaScript-XPath lib is located in following path : 84 84 var xpathLibUrl = baseUrl + 'javascript-xpath/javascript-xpath.js'; 85 85 86 86 87 87 /** 88 * Append JavaScript-X path(http://coderepos.org/share/wiki/JavaScript-XPath) to HTML Document89 * 90 * @param doc - HTML Document to add xpath lib91 * @param callback - callback function, invoked when xpath lib loaded88 * Append JavaScript-XPath(http://coderepos.org/share/wiki/JavaScript-XPath) to HTML Document 89 * 90 * @param doc - HTML Document to add XPath lib 91 * @param callback - callback function, invoked when XPath lib loaded 92 92 * @param scope - scope object to be applied in callback 93 93 */ 94 function addX pathLibrary(doc, callback, scope) {94 function addXPathLibrary(doc, callback, scope) { 95 95 if (doc.evaluate) { 96 96 callback.call(scope, doc); … … 99 99 scriptEl.type = 'text/javascript'; 100 100 scriptEl.src = xpathLibUrl; 101 var ctEl = doc. getElementsByTagName('head')[0] || doc.body;101 var ctEl = doc.documentElement; 102 102 ctEl.appendChild(scriptEl); 103 pollX pathLibLoadStatus();104 } 105 106 function pollX pathLibLoadStatus() {103 pollXPathLibLoadStatus(); 104 } 105 106 function pollXPathLibLoadStatus() { 107 107 if (doc.evaluate) { 108 108 callback.call(scope, doc); … … 121 121 * @param contextNode - context node to search elements by xpath 122 122 */ 123 function queryX pathElementList(doc, xpath, contextNode) {123 function queryXPathElementList(doc, xpath, contextNode) { 124 124 var result = doc.evaluate(xpath, contextNode || doc, null, 7, null); 125 125 var elements = []; … … 137 137 * @param contextNode - context node to search elements by xpath 138 138 */ 139 function queryX pathElement(doc, xpath, contextNode) {139 function queryXPathElement(doc, xpath, contextNode) { 140 140 return doc.evaluate(xpath, contextNode || doc, null, 8, null).singleNodeValue; 141 141 } … … 152 152 this.siteinfo = info; 153 153 this.queueCount = 0; 154 } 154 }; 155 155 156 156 … … 170 170 } 171 171 , 172 172 173 173 // private 174 174 requestDocument : function() { … … 180 180 handleIframe : function(ifr) { 181 181 this.iframe = ifr; 182 addX pathLibrary(ifr.contentWindow.document, this.handleLoadLibrary, this);182 addXPathLibrary(ifr.contentWindow.document, this.handleLoadLibrary, this); 183 183 } 184 184 , … … 194 194 refreshQueue : function() { 195 195 if (!this.paragraphs) { 196 this.paragraphs = queryX pathElementList(this.doc, this.siteinfo.paragraph);197 } 196 this.paragraphs = queryXPathElementList(this.doc, this.siteinfo.paragraph); 197 } 198 198 while (this.queueCount > 0 && this.paragraphs.length > 0) { 199 199 var p = this.paragraphs.shift(); … … 206 206 if (this.paragraphs.length == 0) { 207 207 delete this.paragraphs; 208 this.nextUrl = queryX pathElement(this.doc, this.siteinfo.nextLink);208 this.nextUrl = queryXPathElement(this.doc, this.siteinfo.nextLink); 209 209 this.cleanupIframe(); 210 210 if (!this.nextUrl) { … … 218 218 219 219 // private 220 cleanupIframe : function() {220 cleanupIframe : function() { 221 221 this.doc = null; 222 222 this.iframe.parentNode.removeChild(this.iframe); … … 235 235 , 236 236 237 //abstract 238 onFetchParagraph : emptyFn, 237 //abstract 238 onFetchParagraph : emptyFn 239 , 239 240 240 241 //abstract 241 242 onFinish : emptyFn 242 243 243 } 244 }; 244 245 245 246 window.JSAutoPageScraper = JSAutoPageScraper; -
lang/javascript/jsAutoPageScraper/trunk/js/scriptLoader.js
r9343 r9360 29 29 function waitLoading(scrinfo) { 30 30 if (window[scrinfo.depends]) { 31 loadScript(scrinfo.url); 31 loadScript(scrinfo.url); 32 32 } else { 33 33 setTimeout(function() { waitLoading(scrinfo) }, 500); … … 40 40 script.charset = 'utf-8'; 41 41 script.src = url; 42 (document.getElementsByTagName('head')[0]||document.body).appendChild(script);42 document.documentElement.appendChild(script); 43 43 } 44 44 -
lang/javascript/jsAutoPageScraper/trunk/test/jsAutoPageScraper-test.js
r9334 r9360 2 2 3 3 // From AutoPagerize && LDRize 4 var siteinfos = 5 [{ url: 'http://www .amazon.co.jp/gp/registry/(?:wishlist/|registry.html.*type=wishlist)',4 var siteinfos = 5 [{ url: 'http://www\\.amazon\\.co\\.jp/gp/registry/wishlist/|registry\\.html.+type=wishlist', 6 6 nextLink: '//a[contains(string(.), "次")]', 7 7 insertBefore: '//form[@name="editItems"][last()]/table/following-sibling::node()', 8 8 pageElement: '//form[@name="editItems"]/table', 9 9 exampleUrl: 'http://www.amazon.co.jp/gp/registry/wishlist/ref=topnav__gw/250-9892965-2605017', 10 name: 'Amazon ウィッシュリスト',10 name: 'Amazon.co.jp ウィッシュリスト', 11 11 domain: 'http://www.amazon.[a-z.]+/gp/registry/wishlist/', 12 12 paragraph: '//form[@name="editItems"]/table/tbody', … … 15 15 stripe: true, 16 16 height: 0 }, 17 { url: 'http://www .amazon.co.jp/.+/customer-reviews/',17 { url: 'http://www\\.amazon\\.co\\.jp/.+/customer-reviews/', 18 18 nextLink: '//a[text()="次へ"]', 19 19 insertBefore: '//div[@id="customerReviews"]/div/hr/following-sibling::node()[last()]', 20 20 pageElement: '//div[@id="customerReviews"]/div/hr[1]/following-sibling::node()', 21 21 exampleUrl: 'http://www.amazon.co.jp/Best-1980-1990-U2/dp/customer-reviews/B00000DFSK/ref=cm_cr_dp_all_helpful?ie=UTF8&customer-reviews.sort%5Fby=-SubmissionDate&coliid=&showViewpoints=1&customer-reviews.start=1&colid=', 22 name: 'Amazon 商品ページ',22 name: 'Amazon.co.jp 商品ページ', 23 23 domain: 'http://www.amazon.[a-z.]+/([^./]+?/)?(o/ASIN|dp|exec/obidos/ASIN)/', 24 24 paragraph: '(id("handleBuy") | //*[td | div][contains(concat(" ",normalize-space(@class)," ")," bucket ")])', 25 25 height: 0 }, 26 { url: 'http://www .amazon.co.jp/(s/|gp/search)',26 { url: 'http://www\\.amazon\\.co\\.jp/s/|gp/search', 27 27 nextLink: 'id("pagnNextLink")', 28 28 insertBefore: '//table[@class="headingBar"][2]', 29 29 pageElement: 'id("Results")', 30 30 exampleUrl: 'http://www.amazon.co.jp/s/ref=nb_ss_gw/250-9892965-2605017?field-keywords=windows', 31 name: 'Amazon 検索結果',31 name: 'Amazon.co.jp 検索結果', 32 32 domain: 'http://www.amazon.[a-z.]+/(s/|gp/search)', 33 33 paragraph: '//td[contains(@class,"searchitem")]', … … 35 35 stripe: true, 36 36 height: 0 }, 37 { url: 'http:// .+.blogspot.com/*',37 { url: 'http://[^.]+\\.blogspot\\.com/.*', 38 38 nextLink: 'id("blog-pager-older-link")/a', 39 39 insertBefore: 'id("blog-pager")', 40 40 pageElement: '//div[contains(@class,"blog-posts")]', 41 41 exampleUrl: 'http://52pairplunge.blogspot.com/', 42 name: ' blogspot.com',42 name: 'Blogger', 43 43 domain: '.blogspot.com', 44 44 paragraph: '//h3[@class="post-title"]', 45 45 link: 'a', 46 46 stripe: false }, 47 { url: ' www.citeulike.org',47 { url: '//www\\.citeulike\\.org/', 48 48 nextLink: '//div[contains(@class,"content")]/table/tbody/tr/td/b/a', 49 49 insertBefore: 'id("navright")', 50 50 pageElement: '//div[contains(@class,"content")]', 51 51 exampleUrl: 'http://www.citeulike.org/', 52 name: ' citeulike',52 name: 'CiteULike', 53 53 domain: 'http://www.citeulike.org', 54 54 paragraph: '//div[contains(@class,"list")]/li', 55 55 link: 'div/a[contains(@class,"title")]' }, 56 { url: 'http://search .cpan.org/search*',56 { url: 'http://search\\.cpan\\.org/search.*', 57 57 nextLink: '//div[@class="pages"]//td//a[last()]', 58 58 insertBefore: '//div[@class="footer"]', … … 64 64 link: 'a', 65 65 stripe: true }, 66 { url: 'http://( (danbooru|miezaru).donmai.us|nekobooru.net|moe.imouto.org)/post',66 { url: 'http://(?:(?:danbooru|miezaru)\\.donmai\\.us|nekobooru\\.net|moe\\.imouto\\.org)/post', 67 67 nextLink: '(id("paginator")/a[@class="arrow"])[last()]', 68 68 insertBefore: '(//span[@class="thumb"])[last()]/following-sibling::node()', … … 74 74 link: 'a', 75 75 view: 'a/img' }, 76 { url: 'http://del .icio.us/*',76 { url: 'http://del\\.icio\\.us/.*', 77 77 nextLink: '//a[@accesskey="e"]', 78 78 insertBefore: 'id("main")/p[2]', … … 86 86 stripe: true, 87 87 height: 0 }, 88 { url: 'http://del .icio.us/search/',88 { url: 'http://del\\.icio\\.us/search/', 89 89 nextLink: '//div[@id="main"]/div/p[@class="verysmall"]/a[last()]', 90 90 insertBefore: '//ol[@class="posts"]/following-sibling::node()[1]', … … 98 98 stripe: true, 99 99 height: 0 }, 100 { url: 'http://( www.)?digg.com/',100 { url: 'http://(?:www\\.)?digg\\.com/', 101 101 nextLink: '//div[@class="pages"]/a[last()][@class="nextprev"]', 102 102 insertBefore: '//div[@class="pages"]', 103 103 pageElement: '//div[contains(@class, "news-summary")]', 104 104 exampleUrl: 'http://digg.com/', 105 name: ' digg.com',105 name: 'Digg', 106 106 domain: 'http://digg.com/', 107 107 paragraph: '//div[@class="main"]//div[@class="news-summary"]', 108 108 link: 'descendant::a[0]' }, 109 { url: 'http://japanese .engadget.com/',109 { url: 'http://japanese\\.engadget\\.com/', 110 110 nextLink: 'id("paging")/li[@class="newer"]/a', 111 111 insertBefore: 'id("content")/p', … … 117 117 link: 'h2/a', 118 118 focus: 'id("bloginfo")/form/input[@type="text"]' }, 119 { url: 'https://addons .mozilla.org/w+(-w+)?/firefox/browse/',119 { url: 'https://addons\\.mozilla\\.org/[a-z]{2}(?:-[A-Z]{2})?/firefox/browse/', 120 120 nextLink: '//div[@id="pagination"]/a[starts-with(text(),"next") or starts-with(text(),"次")]', 121 121 insertBefore: '//div[@id="content"]/div[@class="divider"]', … … 126 126 paragraph: '//h2[contains(concat(" ",normalize-space(@class)," ")," addonname ")]', 127 127 link: 'a' }, 128 { url: 'http:// www.flickr.com/photos/friends',128 { url: 'http://(?:www\\.)?flickr\\.com/photos/friends', 129 129 nextLink: '//div[@id="Main"]/div[@class="Pages"]/div[@class="Paginator"]/a[@class="Next"]', 130 130 insertBefore: '//div[@id="Main"]/div[@class="Pages"]', … … 136 136 link: 'p[contains(@class,"Photo")]/span/a', 137 137 height: 30 }, 138 { url: 'http:// .*flickr.com/photos/.+/sets/',138 { url: 'http://(?:[^.]+\\.)?flickr\\.com/photos/[^/]+/sets/', 139 139 nextLink: '//a[@class="Next"]', 140 140 insertBefore: 'id("vsPagination")', … … 146 146 link: 'p[contains(@class,"Photo")]/span/a', 147 147 height: 30 }, 148 { url: 'http:// .*flickr.com/search/',148 { url: 'http://(?:[^.]+\\.)?flickr\\.com/search/', 149 149 nextLink: '//a[@class="Next"]', 150 150 insertBefore: '//div[@class="Pages"]', … … 155 155 paragraph: '//table[@class="DetailResults"]/tbody/tr', 156 156 link: 'td[contains(@class,"DetailPic")]/span/a' }, 157 { url: 'http:// .*flickr.com/photos/tags/',157 { url: 'http://(?:[^.]+\\.)?flickr\\.com/photos/tags/', 158 158 nextLink: '//a[@class="Next"]', 159 159 insertBefore: '//div[@class="Pages"]/following-sibling::node()[1]', … … 165 165 link: 'p[contains(@class,"Photo")]/span/a', 166 166 height: 30 }, 167 { url: 'http:// .*flickr.com/photos/.+/tags/',167 { url: 'http://(?:[^.]+\\.)?flickr\\.com/photos/[^/]+/tags/', 168 168 nextLink: '//a[@class="Next"]', 169 169 insertBefore: '//div[@class="Pages"]', … … 176 176 link: 'p[contains(@class,"Photo")]/span/a', 177 177 height: 30 }, 178 { url: 'http://friendfeed .com/',178 { url: 'http://friendfeed\\.com/', 179 179 nextLink: '//div[contains(concat(" ",@class," ")," pager ")]/a[last()]', 180 180 appendChild: '//div[@id="feed" and @class="feed"]', … … 185 185 paragraph: '//div[contains(concat(" ",normalize-space(@class)," ")," entry ")]', 186 186 link: './/div[@class="link"]/a' }, 187 { url: 'http://friendfeed .com/settings/subsc',187 { url: 'http://friendfeed\\.com/settings/subsc', 188 188 nextLink: '//div[contains(concat(" ",@class," ")," pager ")]/a[last()]', 189 189 pageElement: '//table[@class="friends"]', … … 193 193 paragraph: '//div[contains(concat(" ",normalize-space(@class)," ")," entry ")]', 194 194 link: './/div[@class="link"]/a' }, 195 { url: 'http://friendfeed .com/',195 { url: 'http://friendfeed\\.com/', 196 196 nextLink: '//div[contains(concat(" ",@class," ")," pager ")]/a[contains(text(),"Older")]', 197 197 pageElement: 'id("feedcontainer")', … … 201 201 paragraph: '//div[contains(concat(" ",normalize-space(@class)," ")," entry ")]', 202 202 link: './/div[@class="link"]/a' }, 203 { url: 'http:// (.*).google.*/codesearch*',203 { url: 'http://[^/]+\\.google\\.[^/]+/codesearch.*', 204 204 nextLink: '(id("navbar")//td[@class="b"]/a)[last()]', 205 205 insertBefore: 'id("navbar")', … … 211 211 link: 'h2//a[contains(@class,"l")]', 212 212 stripe: true }, 213 { pageElement: '//div[contains(concat(" ",@class," ")," directory-entry ")]', 213 { url: 'http://www\\.google\\.com/ig/directory', 214 pageElement: '//div[contains(concat(" ",@class," ")," directory-entry ")]', 214 215 nextLink: '//p[@class="pagelinks"]//a[last()]', 215 url: 'http://www.google.com/ig/directory',216 216 exampleUrl: 'http://www.google.com/ig/directory', 217 217 name: 'Google', … … 220 220 link: 'h2//a[contains(@class,"l")]', 221 221 stripe: true }, 222 { url: 'http:// (.*).google.+/custom',222 { url: 'http://[^/]+\\.google\\.[^/]+/custom', 223 223 nextLink: '//td[@class="b"][last()]//a', 224 224 pageElement: '//div[@class="g"]', … … 229 229 link: 'h2//a[contains(@class,"l")]', 230 230 stripe: true }, 231 { url: 'http:// (.*).google.+/(search).+',231 { url: 'http://[^/]+\\.google\\.[^/]+/search.+', 232 232 nextLink: 'id("navbar")//td[last()]/a', 233 233 insertBefore: 'id("res")/*[last()-1]', … … 239 239 link: 'h2//a[contains(@class,"l")]', 240 240 stripe: true }, 241 { url: 'http:// (.*).google.*/videosearch*',241 { url: 'http://[^/]+\\.google\\.[^/]+/videosearch.*', 242 242 nextLink: 'id("nextpage")', 243 243 insertBefore: 'id("pagenavigatortable")', … … 249 249 link: 'table/tbody/tr/td[2]/div/a', 250 250 stripe: true }, 251 { url: 'http://www .gumonji.net/cgi-bin/diary_list.cgi',251 { url: 'http://www\\.gumonji\\.net/cgi-bin/diary_list\\.cgi', 252 252 nextLink: '//div[@class="frame"]/div[@class="main"]/div[@class="page2"]/div[@class="pager_next"]/a', 253 253 insertBefore: '//div[@id="googlead"]', … … 259 259 link: 'td/div[contains(@class,"list_dtitle")]/p/a', 260 260 height: 23 }, 261 { url: 'http://www .hmv.co.jp/search/index.asp?.+',261 { url: 'http://www\\.hmv\\.co\\.jp/search/index\\.asp\\?.+', 262 262 nextLink: '//form[@name="form2"]//table/tbody/tr/td[8]/a[last()]', 263 263 insertBefore: '//form[@name="form2"]', 264 264 pageElement: '//form[@name="form2"]/ancestor::td[2]/table/tbody/tr/td/table[position()!=last()]', 265 265 exampleUrl: 'http://www.hmv.co.jp/search/index.asp?keyword=magic', 266 name: 'HMV 検索結果',266 name: 'HMV 検索結果', 267 267 domain: 'http://www.hmv.co.jp/search/', 268 268 paragraph: '//tr/td[@valign="top"]/table/tbody/tr/td[@valign="top"]/table/tbody/child::tr[position()=1 and position()=last()]', 269 269 link: 'td[3]/table/tbody/tr/td/span[1]/a', 270 270 stripe: true }, 271 { url: 'http:// (kichiku|kikuchi).oq.la/',271 { url: 'http://ki(?:chiku|kuchi)\\.oq\\.la/', 272 272 nextLink: '//div[@id="maincontent"]/div[@class="pagerize"]/ul/li[@class="pagelink"]/a[text()=">"]', 273 273 insertBefore: '//div[@id="maincontent"]/div[@class="pagerize"]/ul', … … 280 280 view: '(.//div[@class="user"]/p/a/img|.//span/a/text())', 281 281 stripe: true }, 282 { url: 'http://www .last.fm/user/[^/]*/charts',282 { url: 'http://www\\.last\\.fm/user/[^/]+/charts', 283 283 nextLink: '//a[@class="nextlink"]', 284 284 insertBefore: '//div[@class="pagination"][last()]', … … 291 291 view: 'a/text()', 292 292 focus: 'id("searchInput")' }, 293 { url: 'http://lwn .net/.*',293 { url: 'http://lwn\\.net/.*', 294 294 nextLink: '//ul/li/a[contains(text(), "Next ")]', 295 295 insertBefore: '//body/center', 296 296 pageElement: '//div[@class="ArticleText"]', 297 297 exampleUrl: 'http://lwn.net/', 298 name: ' lwn.net',298 name: 'LWN.net', 299 299 domain: 'http://lwn.net/', 300 300 paragraph: '//div[@class="Headline"]' }, 301 { url: 'http://clip .livedoor.com/clips/*',301 { url: 'http://clip\\.livedoor\\.com/clips/.*', 302 302 nextLink: '//a[@rel="next"]', 303 303 insertBefore: '//div[contains(@class,"pager-bottom")]', … … 311 311 stripe: true, 312 312 height: 0 }, 313 { url: 'http://search .(msn|live).com/',313 { url: 'http://search\\.(?:msn|live)\\.com/', 314 314 nextLink: 'id("pag")/a[@class="nP"]', 315 315 insertBefore: 'id("pag")', … … 322 322 stripe: true, 323 323 height: 10 }, 324 { url: 'https?://www .redhat.com/docs/manuals/.*',324 { url: 'https?://www\\.redhat\\.com/docs/manuals/.*', 325 325 nextLink: '//li[@class="next"]/a', 326 326 pageElement: '//div[@class="section" or @class="preface" or @class="part" or @class="chapter" or @class="toc" or @class="appendix"]', 327 327 exampleUrl: 'http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/ja-JP/Deployment_Guide/ch-fw.html', 328 name: ' redhat manual',328 name: 'Red Hat Manuals', 329 329 domain: 'www.redhat.com/docs/manuals/', 330 330 paragraph: '(//h6 | //h5 | //h4 | //h3 | //h2 | //h1)' }, 331 { url: 'http://www.stage6.com/', 332 nextLink: '//*[contains(@class, "pagination-right")]', 333 insertBefore: '//div[@class="clear-small"]', 334 pageElement: '//*[@class="video" or @class="vertical-separator"]', 335 exampleUrl: 'http://www.stage6.com/videos/tag:horror/order:relevancy', 336 name: 'Stage6', 337 domain: 'http://(www.)?stage6.com/', 338 paragraph: '//div[@class="video"]', 339 link: 'div[2]//a', 340 view: 'div[2]//a/text()' }, 341 { url: 'http://www.tokyotosho.com/', 331 { url: 'http://www\\.tokyotosho\\.com/', 342 332 nextLink: '//div[@id="main"]/form/table/tbody/tr/td[@class="nav"]/a[contains(text(),"Next")]', 343 333 pageElement: '//div[@id="main"]/form/table[@class="listing"]', … … 348 338 paragraph: '//div[@id="main"]//table[@class="listing"]/tbody/tr/td[@class="desc-top"]/ancestor::tr', 349 339 link: 'td[@class="desc-top"]/a' }, 350 { url: 'http://twitxr .com/',340 { url: 'http://twitxr\\.com/', 351 341 nextLink: '//div[@id="divTipBody"]/div/p/a[last()]', 352 342 pageElement: '//div[@id="divTipBody"]', 353 343 exampleUrl: 'http://twitxr.com/kenmat/', 354 name: ' twitxr.com',344 name: 'Twitxr', 355 345 domain: 'http://twitxr.com/', 356 346 paragraph: '//div[@id="frontpage"]//div[contains(concat(" ",normalize-space(@class)," ")," update ")]', 357 347 link: 'a[2]' }, 358 { url: 'http://www .urbandictionary.com/define.php',348 { url: 'http://www\\.urbandictionary\\.com/define\\.php', 359 349 nextLink: '//div[contains(@class,"pager")]/a[last()]', 360 350 insertBefore: '//div[contains(@class,"pager")]', 361 351 pageElement: '//div[contains(@class,"pager")]/preceding-sibling::table[1]', 362 352 exampleUrl: 'http://www.urbandictionary.com/define.php?term=dictionary', 363 name: ' urbandictionary',353 name: 'Urban Dictionary', 364 354 domain: 'urbandictionary.com/define', 365 355 paragraph: '//td[contains(@class,"def_number")]', 366 356 stripe: false }, 367 { url: 'http://userscripts .org/scripts/search',357 { url: 'http://userscripts\\.org/scripts/search', 368 358 nextLink: '//div[@class="pagination"]/span[@class="current"]/following-sibling::a[1]', 369 359 pageElement: 'id("content")/table', … … 376 366 stripe: true, 377 367 height: 0 }, 378 { url: 'http://userscripts .org/scripts/show/',368 { url: 'http://userscripts\\.org/scripts/show/', 379 369 nextLink: '//div[@class="pagination"]/span[@class="current"]/following-sibling::a[1]', 380 370 pageElement: 'id("content")/table', … … 384 374 paragraph: '//table["wide forums"]/tbody/tr[contains(@class,"post")]', 385 375 height: 0 }, 386 { url: 'http://search .*.auctions.yahoo.co.jp/.*',376 { url: 'http://search[^/]*\\.auctions\\.yahoo\\.co\\.jp/.*', 387 377 nextLink: '//td[@align="right" and @width="1%"]/small/b[last()]/a', 388 378 insertBefore: '//center/table/tbody/tr/td[2]/table[last()-4]', 389 379 pageElement: '//center/table/tbody/tr/td[2]/table[last()-5]', 390 380 exampleUrl: 'http://search.auctions.yahoo.co.jp/jp/search/auc?p=123&auccat=0&alocale=0jp&acc=jp', 391 name: 'Yahoo! Auction',381 name: 'Yahoo! オークション', 392 382 domain: 'http://*.*.auctions.yahoo.co.jp/', 393 383 paragraph: '//tr[@bgcolor="#eeeeee"]/td[@align="left"]', 394 384 link: './/a' }, 395 { url: 'http://( list|search)d?.auctions.yahoo.co.jp/.*',385 { url: 'http://(?:list|search)\\d*\\.auctions\\.yahoo\\.co\\.jp/.*', 396 386 nextLink: '//a[contains(text(), "次の25件")]', 397 387 pageElement: '(//b[contains(text(), "のオークション")]/ancestor::table)[last()]', 398 388 exampleUrl: 'http://search5.auctions.yahoo.co.jp/jp/search/auc?p=%A5%EA%A5%CD%A5%F3&auccat=2084063697&alocale=0jp&acc=jp', 399 name: 'Yahoo! Auction',389 name: 'Yahoo! オークション', 400 390 d
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)