diff options
author | mitsugu oyama | 2010-11-05 19:47:41 +0900 |
---|---|---|
committer | mitsugu oyama | 2010-11-05 19:47:41 +0900 |
commit | 103559ef64001a9971433f2fe801e08a5f189e1d (patch) | |
tree | e7818d5d3b2e94a5ca5d91650dcef23503d82a80 /pixiv.js | |
parent | 90f46257e3d7d24b0dbca76bec36a7a8e0512deb (diff) | |
download | vimperator-plugins-103559ef64001a9971433f2fe801e08a5f189e1d.tar.bz2 |
bug fix.
スタックトレースからの表示ページの
画像、漫画をダウンロード可能にする
fixを実施
Diffstat (limited to 'pixiv.js')
-rw-r--r-- | pixiv.js | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -36,18 +36,25 @@ commands.addUserCommand( let Cc=Components.classes; let Ci=Components.interfaces; - let baseInfo; + let id; + if(-1==contents.URL.search(/\&from_sid=/i)){ + id=contents.URL.substr(contents.URL.lastIndexOf('=')+1); + }else{ + let st=contents.URL.search(/illust_id=/i)+'illust_id='.length; + let end=contents.URL.lastIndexOf('&'); + id=contents.URL.substr(st,end-st); + } + + let baseInfo; let scroll; let type=contents.getElementsByClassName('works_display').item(0) .firstChild.getAttribute('href'); if(-1!=type.search(/big&illust_id=/i)){ baseInfo="http://www.pixiv.net/member_illust.php?mode=big&illust_id="; - id=contents.URL.substr(contents.URL.lastIndexOf('=')+1); scroll=''; }else if(-1!=type.search(/manga&illust_id=/i)){ baseInfo="http://www.pixiv.net/member_illust.php?mode=manga&illust_id="; - id=contents.URL.substr(contents.URL.lastIndexOf('=')+1); scroll='&type=scroll'; }else{ liberator.echoerr("This page is not image page and not manga page."); |