aboutsummaryrefslogtreecommitdiffstats
path: root/pixiv.js
diff options
context:
space:
mode:
authormitsugu oyama2014-12-16 11:01:51 +0900
committermitsugu oyama2014-12-16 11:01:51 +0900
commit53e338788940a858769806e7cf212cbec9973143 (patch)
treec5934905b5c8aba8ce3e75c86b4e9664cb23ecfe /pixiv.js
parent03d5778078aff9e5102e02567b098109260d2c37 (diff)
downloadvimperator-plugins-53e338788940a858769806e7cf212cbec9973143.tar.bz2
bug fix
単一画像ページのコンテンツの画像 URL を元にクローリングしていたのを class 名が original-image のイメージ要素の属性 data-src から URL よ り、オリジナル画像 URL を取得し、画像をダウンロードするように変更。
Diffstat (limited to 'pixiv.js')
-rw-r--r--pixiv.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/pixiv.js b/pixiv.js
index 70e9e84..9aefe5c 100644
--- a/pixiv.js
+++ b/pixiv.js
@@ -213,10 +213,7 @@ commands.addUserCommand(
// {{{ save single image file
let getImageUrl=function(pContents){
- let url = pContents.getElementsByClassName("_layout-thumbnail ui-modal-trigger")[0].childNodes.item( 0 ).getAttribute( "src" );
- url = url.replace( /\/.\/[0-9][0-9][0-9]x[0-9][0-9][0-9]\/img\-master/, "/img-original" );
- url = url.replace( /_master[0-9][0-9][0-9][0-9]/, "" );
- url = url.replace( /_m/, "" );
+ let url = pContents.getElementsByClassName("original-image")[0].getAttribute( "data-src" );
return url;
};