os0x / AutoPatchWork

http://code.google.com/p/autopatchwork/
32 stars 17 forks source link

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

Open t-f-m opened 12 years ago

t-f-m commented 12 years ago

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

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

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

Dither commented 12 years ago

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);
    }
os0x commented 12 years ago

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