Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.31 KB | None | 0 0
  1. diff --git a/uAutoPagerize/uAutoPagerize.uc.js b/uAutoPagerize/uAutoPagerize.uc.js
  2. index 0225a9d..8ba00b6 100644
  3. --- a/uAutoPagerize/uAutoPagerize.uc.js
  4. +++ b/uAutoPagerize/uAutoPagerize.uc.js
  5. @@ -86,7 +86,12 @@ var MY_SITEINFO = [
  6.         ,nextLink    : 'id("AutoPagerizeNextLink")'
  7.         ,pageElement : '//tr[@class="bgColor02"][1]|//tr[@class="bgColor02"][1]/following-sibling::tr'
  8.         ,exampleUrl  : 'http://kakaku.com/specsearch/0150/'
  9. -   }
  10. +   },
  11. +   {
  12. +       url         : '^https://search\\.yahoo\\.co\\.jp/search\\?'
  13. +       ,nextLink   : '//div[contains(concat(" ",normalize-space(@class)," "), " Pagenation__next ")][1]/a[1]'
  14. +       ,pageElement: '//div[contains(concat(" ",normalize-space(@class)," "), " Contents__innerGroupBody ")][1]'
  15. +   },
  16.  ];
  17.  
  18.  var MICROFORMAT = [
  19. @@ -818,6 +823,13 @@ AutoPager.prototype = {
  20.  
  21.         var [reqScheme,,reqHost] = this.requestURL.split('/');
  22.         var {protocol, host} = this.win.location;
  23. +       if (reqHost === "search.yahoo.co.jp") {
  24. +           const idx = this.requestURL.indexOf("/**");
  25. +           if (idx != -1) {
  26. +               this.requestURL = decodeURIComponent(this.requestURL.slice(idx+3));
  27. +               [reqScheme,,reqHost] = this.requestURL.split('/');
  28. +           }
  29. +       }
  30.         if (reqScheme !== protocol) {
  31.             log(protocol + " が " + reqScheme + "にリクエストを送ることはできません");
  32.             this.state = "error";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement