os0x / AutoPatchWork

Home Page:http://code.google.com/p/autopatchwork/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NAVERまとめ絡みの特定のSITEINFOが動作しない問題

t-f-m opened this issue · comments

以下のSITEINFOがAutoPatchWorkでは動作しません。
http://wedata.net/items/60489

なお、Firefox、ChromeのAutoPagerizeでは動作したので、AutoPatchWorkでの問題です。

おそらく、NAVERまとめの記事での対策が誤爆しているのではないでしょうか。

Comment out or remove this block in injected script includes/AutoPatchWork.js to fix it:

    if (location.host==='matome.naver.jp') {
      var _get_next = get_next;
      get_next = function(doc) {
        var next = _get_next(doc);
        if (!next || !next.hasAttribute('onclick')) return;
        var nextpage = next.getAttribute('onclick').match(/goPage\(\s*(\d+)\s*\)/)[1];
        var form=document.getElementsByName('missionViewForm')[0];
        var param=[].slice.call(form).map(function(i){return i.name+'='+(i.name==='page'?nextpage:i.value);}).join('&');
        next.href = location.pathname+'?'+param;
        return next;
      };
      next = get_next(document);
    }

I got. i'm going to fix it.
thank you!