Closed kahusi closed 6 years ago
これでどうでしょうか。 8cc724702a538a4b5e40e9bbd29c24197095abdc
対応感謝します。 ただ、自分の環境では新版を入れられないので確認出来ておりません…… (一往 https://github.com/anekos/Ank-Pixiv-Tool/issues/132 は見てはいます)
webextension版のニコ静モジュールを作ったのでよろしければ試してみてください https://github.com/anekos/Ank-Pixiv-Tool/commit/0e97cd878f9a7e1bd5a54e83b8d96950b58fc0e5
ただし無署名なのでfirefoxで動かすのは難しいかもしれません chromeで動かすのはさほど難しくないかもしれません
webextension版、 https://developer.mozilla.org/ja/Add-ons/WebExtensions/Your_first_WebExtension を參考に入れてみた処、動作しました。 ファイル名の変更はソースを書き換える事になるのでしょうか。 (フォルダ自体はFirefox側にある「次のフォルダーに保存する」の設定で変えられましたが)
あと、「情報取得中」や「保存済み」等の挿入テキストが文字化けしていました。
firefoxで動かす場合はこちらの方がいいかもしれませんね https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext
ファイル名の変更は設定から変えられるはずですが ↑の中の「Keeping profile changes」をやらないとfirefoxの終了の度に設定が消えてしまうような気がします(未確認)
文字が化けてるのはfirefoxの問題と認識しているのでこちらで対応する予定はありません
その他旧版との動作の違いについては作業メモも読んでみてください https://github.com/anekos/Ank-Pixiv-Tool/blob/feature/webextensions/webextensions/misc/
文字化けの件、回避方法を見つけたので修正しました。
また無署名だとweb-extで「Keeping profile changes」を使っても設定や履歴を維持できないことを確認しました。失礼しましたm( )m
cyberfox 52.4.0にて動作確認しました。
特に問題なさそうなのでcloseします。
web-ext runでもダウンロード履歴を保持できることがわかりましたので追記します。
manifest.jsonに以下の様に applications.gecko.id を追加してください。
"applications": {
"gecko": {
"id": "loot@vixip.kna",
"strict_min_version": "55.0"
}
}
おまけで追加を行うスクリプトも作りました。
なぜweb-ext runにはidオプションがないのか…。
それはそれとして、AMO登録も済みましたのでcloseさせて頂きます。
表題の通り、適当なイラストをDLするとエラーが出て保存出来ません。 環境はFirefox55.0.3 (64ビット)、Windows7 Pro SP1 64bit エラーの内容は以下: <<ANK<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< [TypeError] message: doc.querySelector(...) is null filename: chrome://ankpixiv/content/sites/anknicosei.js linenumber: 454 stack: getImageUrlAsync/<@chrome://ankpixiv/content/sites/anknicosei.js:454:21 TaskImpl_run@resource://gre/modules/Task.jsm:321:42 process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:922:23 walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:806:7 scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:742:11