Automatically loads the next page and inserts into current page when you reach the end of the page. like AutoPagerize.
os0x / autopatchwork Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://code.google.com/p/autopatchwork/
Home Page: http://code.google.com/p/autopatchwork/
Automatically loads the next page and inserts into current page when you reach the end of the page. like AutoPagerize.
以下のSITEINFOがAutoPatchWorkでは動作しません。
http://wedata.net/items/60489
なお、Firefox、ChromeのAutoPagerizeでは動作したので、AutoPatchWorkでの問題です。
おそらく、NAVERまとめの記事での対策が誤爆しているのではないでしょうか。
こんにちは。
サイト固有かつFirefox+AutoPagerizeなどでも再現する問題なので、AutoPatchWorkのIssueとするのが適切かどうかわかりませんが、SITEINFOの修正だけでは解決できそうにない問題のような気がしたのでここに書き込ませていただきました。
もしSITEINFOの修正だけで済む問題だったらすみません。
Amazon.co.jpではある条件下 (詳細は不明ですが、手元ではAmazonにログインすると再現しました) でページャが新しいタイプのものに置き換えられるらしく、今回の問題はこの新しいページャで起きる問題です。
新しいページャでは、hash fragmentを利用して動的にページ切り替えを行うようになっており、それに伴ってnextLinkで指定されているpagnNextLinkのhrefが#から始まるものに変更されています。そのため、AutoPatchWorkが動作するとそのとき開いていたURLの内容がそのまま継ぎ足されてしまいます。SITEINFOを修正できないかと思ったのですが、DOMツリー上にnextLinkとして使えるような代わりの要素が見当たらなかったので、対処方法がわかりませんでした。
なお、問題が起きるのは最初の1回だけで、2回目以降は正しいページが継ぎ足されます。これは、pagnNextLinkのhrefはHTMLの時点では#から始まるものにはなっておらず、JavaScriptで動的に変更しているためだと思われます。
よろしくお願いします。
Just I realized that it's 404. What's happened?
http://wedata.net/items/27628?rev=121630
既にロールバックしていますが、この状態のSITEINFOのときに
Scrollの含まれるほうのexampleUrlにアクセスすると、
2ページ目以降で、1ページ目と同じ画像がロードされます。
AutoPagerizeにおけるresolvePathに相当する処理が必要と思われます。
On Safari (7.0.1 currently) AutoPatchWork seems to have problems respecting the settings from time to time. I mean the checkboxes and radios remain checked/unchecked correctly, but AutoPatchWork often ignores them, causing unwanted behaviors, and requires user to manually toggle them again just to make it work.
Any ideas?
The calc_remain_height
shouldn't accept nodes that don't have visual representation, like script
or style
, but it does and it breaks extension on some pages. Here is the corrected version:
function calc_remain_height() {
var rect = null, bottom = null, _point = insert_point;
while (_point) {
if (typeof _point.getBoundingClientRect === 'function') {
rect = _point.getBoundingClientRect();
if (rect && !(rect.top === 0 && rect.right === 0 && rect.bottom === 0 && rect.left === 0)) break;
else rect = null;
}
if (_point.nextSibling) _point = _point.nextSibling;
else break;
}
if (rect) {
bottom = rect.top + window.pageYOffset;
} else if (append_point && typeof append_point.getBoundingClientRect === 'function') {
rect = append_point.getBoundingClientRect();
bottom = rect.top + rect.height + window.pageYOffset;
}
if (!bottom) bottom = Math.round(rootNode.scrollHeight * 0.8);
return rootNode.scrollHeight - bottom + options.BASE_REMAIN_HEIGHT;
}
https://github.com/os0x/AutoPatchWork/blob/master/AutoPatchWork.safariextension/includes/AutoPatchWork.js#L702
全体の高さが変わらないとき、ここ、702行目の判定が真になって、3ページ目以降が存在しても正常終了します。
サイトバーがpageElementより倍以上の高さがあるようなページで発生します。
Just a heads-up: Google automatically unchecks (disables) the extension now. I was wondering why it wasn't working.
Hi there,
the extension does not work on https://encrypted.google.com . It only works on https://google.com search. Is there any possibility of supporting the encrypted version? There are differences between the two even though both are HTTPS channel.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.