| @@ -65,21 +65,60 @@ | |||
| The read Formation appears as a link<br> | |||
| <img src="images/tips-qr-read-found.png" alt="成功读取到二维码"><br> | |||
| 目前可以读取 | Currently can read: | |||
| <ol> | |||
| <li>本程序自有格式的二维码<br> | |||
| This program's own format QR code<br> | |||
| <img src="images/tips-qr-pdf.png" alt="PDF二维码"> | |||
| </li> | |||
| <li>本程序网址链接的二维码<br> | |||
| QR code of this program's URL<br> | |||
| <img src="images/tips-qr-url.png" alt="URL二维码"> | |||
| </li> | |||
| <li>PDC 的二维码<br> | |||
| PDC format QR code<br> | |||
| <img src="images/tips-qr-pdc.webp" alt="PDC二维码"> | |||
| </li> | |||
| </ol> | |||
| </p> | |||
| <h3>与 PADDB 进行数据交换 | Data exchange with PADDB</h3> | |||
| <p>由于 PADDB 跨域,您需要在<a href="https://greasyfork.org/help/installing-user-scripts">用户脚本管理器</a>内安装<a href="https://greasyfork.org/scripts/458521">此辅助脚本</a>以支持此功能。。<br> | |||
| Because PADDB is cross-domain, you need to install <a href="https://greasyfork.org/scripts/458521">this helper script</a> within the <a href="https://greasyfork.org/help/installing-user-scripts">User Script Manager</a> to support this feature.<br> | |||
| <img src="images/tips-paddb-install-script.webp" alt="安装脚本"><br> | |||
| <h4>导入 PADDB 队伍 | Import PADDB team</h4> | |||
| <p> | |||
| 上传自己的队伍,或者在队伍模板里搜索其他人的队伍<br> | |||
| Upload your own team or search for someone else's party in the Team Templates<br> | |||
| <img src="images/tips-paddb-upload-team-in-paddb.png" alt="上传自身的脚本"><br> | |||
| <img src="images/tips-paddb-search-team-in-paddb.png" alt="搜索别人的脚本"><br> | |||
| 复制上传后的队伍链接<br> | |||
| Copy the uploaded Team URL<br> | |||
| <img src="images/tips-paddb-copy-team-link.png" alt="复制队伍链接"><br> | |||
| 打开二维码与数据交换功能,粘贴队伍链接并读取<br> | |||
| Turn on the QR code and Data Exchange feature, paste the team link and read it<br> | |||
| <img src="images/tips-paddb-read-link.png" alt="粘贴队伍链接并读取"><br> | |||
| 读取到的队伍会显示为链接<br> | |||
| The read Formation appears as a link<br> | |||
| <img src="images/tips-qr-read-found.png" alt="成功读取到二维码"><br> | |||
| </p> | |||
| <h4>将队伍上传到 PADDB | Upload the Team to PADDB</h4> | |||
| <p> | |||
| 打开二维码与数据交换功能,在下方输入用户名与密码。<br> | |||
| Turn on the QR code and Data Exchange feature, Enter your user ID and password below.<br> | |||
| <img src="images/tips-paddb-upload-region.png" alt="PADDB 数据上传区"><br> | |||
| 没有输入队伍链接时,将会上传队伍,并获得一个可被你的账号密码编辑的新的队伍链接。如果有,则会更新当前连接的队伍数据。<br> | |||
| If you do not enter a team link, the team will be uploaded and a new team link will be obtained that can be edited by your account password. If so, the currently connected party data is updated.<br> | |||
| <br> | |||
| 注意:| Note: | |||
| <ol> | |||
| <li>你无法修改 PADDB 上其他用户的队伍,但是可以全新上传为自己的并修改。<br> | |||
| You can't update other users' team link on PADDB, but you can upload as your own and modify them. | |||
| </li> | |||
| <li>PADDB 目前只支持单人游戏队伍。<br> | |||
| PADDB currently only supports solo team. | |||
| </li> | |||
| </ol> | |||
| </p> | |||
| </p> | |||
| <ol> | |||
| <li>本程序自有格式的二维码<br> | |||
| This program's own format QR code<br> | |||
| <img src="images/tips-qr-pdf.png" alt="PDF二维码"> | |||
| </li> | |||
| <li>本程序网址链接的二维码<br> | |||
| QR code of this program's URL<br> | |||
| <img src="images/tips-qr-url.png" alt="URL二维码"> | |||
| </li> | |||
| <li>PDC 的二维码<br> | |||
| PDC format QR code<br> | |||
| <img src="images/tips-qr-pdc.webp" alt="PDC二维码"> | |||
| </li> | |||
| </ol> | |||
| <h2 id="editing-tips">编辑技巧 | Editing tips</h2> | |||
| <ul> | |||
| <li>使用<strong>后退</strong><code>Alt + ←</code>即可撤销上一次修改,需要重做则使用<strong>前进</strong><code>Alt + →</code>。<br> | |||
| @@ -562,7 +562,7 @@ label[for="box-have"]::after | |||
| margin: calc(-100px * (1 - 0.6) / 2); | |||
| } | |||
| .control-box .btn-qrcode::before{ | |||
| content: "\f029 QR Code"; | |||
| content: "\f029 QR Code and \f0ec Data exchange"; | |||
| } | |||
| .read-qr-box::before | |||
| @@ -598,14 +598,38 @@ label[for="sourceSelect"]::before | |||
| { | |||
| content: "\f1c5 Read image file"; | |||
| } | |||
| #qr-code-frame .read-external-link::before | |||
| { | |||
| content: "\f0c1 Parse PADDB link"; | |||
| } | |||
| #qr-code-frame .read-string::before { | |||
| content: "\f891 Read string"; | |||
| } | |||
| #qr-code-frame .paddb-team-edit::before | |||
| { | |||
| content: "Upload Team Data to PADDB:"; | |||
| } | |||
| label[for="paddb-username"]::before | |||
| { | |||
| content: "PADDB user ID:"; | |||
| } | |||
| label[for="paddb-password"]::before | |||
| { | |||
| content: "PADDB password:"; | |||
| } | |||
| label[for="paddb-team-id"]::before | |||
| { | |||
| content: "PADDB Team Link:"; | |||
| } | |||
| #paddb-save-or-upload-team::before | |||
| { | |||
| content: "Save"; | |||
| } | |||
| #paddb-team-id:placeholder-shown+#paddb-save-or-upload-team::before { | |||
| content: "Upload new Team"; | |||
| } | |||
| body:not(.external-link-support) #external-support::before | |||
| { | |||
| content: "\f552 Install helper scripts to use PADDB-related features"; | |||
| } | |||
| label[for="qr-data-type-pdf"]::before | |||
| { | |||
| content: "P&D Formation Maker"; | |||
| @@ -615,7 +639,11 @@ label[for="qr-data-type-pdc"]::before | |||
| content: "P&D Damage Caculater (PDC)"; | |||
| } | |||
| label[for="qr-data-type-pdchu"]::before { | |||
| content: "Valeria(pdchu)"; | |||
| content: "Valeria (pdchu)"; | |||
| } | |||
| label[for="qr-data-type-paddb"]::before | |||
| { | |||
| content: "PADDB (Only for Solo)"; | |||
| } | |||
| #btn-set-dungeon-enchance::before | |||
| { | |||
| @@ -405,7 +405,7 @@ label[for="have-8-latent-slot"]::after | |||
| } | |||
| label[for="box-have"]::after | |||
| { | |||
| content: "ケースに所有することを強調します"; | |||
| content: "ケースに所有することを強調"; | |||
| } | |||
| .special-div .special-add::before { | |||
| content: "➕"; | |||
| @@ -451,7 +451,7 @@ label[for="box-have"]::after | |||
| } | |||
| .real-time-change-card-label::after | |||
| { | |||
| content: "カードを即座に更新します"; | |||
| content: "カードを即座に更新"; | |||
| } | |||
| .base .evo-type::before, | |||
| .base .evo-type::after | |||
| @@ -525,7 +525,7 @@ label[for="box-have"]::after | |||
| } | |||
| .control-box .btn-qrcode::before{ | |||
| content: "\f029 QRコード"; | |||
| content: "\f029 QR コード と \f0ec データ交換"; | |||
| } | |||
| .read-qr-box::before | |||
| @@ -534,7 +534,7 @@ label[for="box-have"]::after | |||
| } | |||
| .save-qr-box::before | |||
| { | |||
| content: "QRコードを生成します:"; | |||
| content: "QRコードを生成:"; | |||
| } | |||
| .formation-link-from-string>a:empty::before | |||
| @@ -555,20 +555,44 @@ label[for="sourceSelect"]::before | |||
| } | |||
| #qr-code-frame .read-qr-camera.running::before | |||
| { | |||
| content: "\f28d カメラの使用を停止します"; | |||
| content: "\f28d カメラの使用を停止"; | |||
| } | |||
| #qr-code-frame .read-qr-file::before | |||
| { | |||
| content: "\f1c5 画像ファイルを読み取る"; | |||
| } | |||
| #qr-code-frame .read-external-link::before | |||
| { | |||
| content: "\f0c1 PADDB リンクの解析"; | |||
| } | |||
| #qr-code-frame .read-string::before { | |||
| content: "\f891 文字列を読み取ります"; | |||
| } | |||
| #qr-code-frame .paddb-team-edit::before | |||
| { | |||
| content: "チーム データを PADDB にアップロード:"; | |||
| } | |||
| label[for="paddb-username"]::before | |||
| { | |||
| content: "PADDB ユーザー ID:"; | |||
| } | |||
| label[for="paddb-password"]::before | |||
| { | |||
| content: "PADDB パスワード:"; | |||
| } | |||
| label[for="paddb-team-id"]::before | |||
| { | |||
| content: "PADDBチームリンク:"; | |||
| } | |||
| #paddb-save-or-upload-team::before | |||
| { | |||
| content: "保存"; | |||
| } | |||
| #paddb-team-id:placeholder-shown+#paddb-save-or-upload-team::before { | |||
| content: "新しいチームをアップロード"; | |||
| } | |||
| body:not(.external-link-support) #external-support::before | |||
| { | |||
| content: "\f552 PADDB 関連機能を使用するセカンダリ スクリプトをインストール"; | |||
| } | |||
| label[for="qr-data-type-pdf"]::before | |||
| { | |||
| content: "パズドラダッシュフォーメーション"; | |||
| @@ -578,7 +602,11 @@ label[for="qr-data-type-pdc"]::before | |||
| content: "パズドラダメージ計算 (PDC)"; | |||
| } | |||
| label[for="qr-data-type-pdchu"]::before { | |||
| content: "Valeria(pdchu)"; | |||
| content: "Valeria (pdchu)"; | |||
| } | |||
| label[for="qr-data-type-paddb"]::before | |||
| { | |||
| content: "PADDB (ソロのみ)"; | |||
| } | |||
| #btn-set-dungeon-enchance::before | |||
| { | |||
| @@ -1,13 +1,12 @@ | |||
| const _localTranslating = { | |||
| webpage_title: `パズル&ドラゴンズ${teamsCount}人のチーム図作成ツール`, | |||
| addition_display: "追加の表示", | |||
| title_blank: "入力タイトル", | |||
| detail_blank: "入力詳細", | |||
| force_reload_data: "データの強制更新", | |||
| request_input: tp`${'info'}を入力してください`, | |||
| link_read_message: { | |||
| success: tp`発見 ${'type'} 形式.`, | |||
| need_user_script: `PADDB はドメイン間であるため、この機能をサポートするには、ユーザー スクリプト マネージャ内にこのセカンダリ スクリプトをインストールする必要があります。`, | |||
| need_user_script: `PADDB はドメイン間であるため、この機能をサポートするには、ユーザー スクリプト マネージャ内にセカンダリ スクリプトをインストールする必要があります。`, | |||
| user_script_link: `スクリプトへのリンク`, | |||
| type: { | |||
| "PADDF": "PADDF", | |||
| @@ -15,11 +14,14 @@ | |||
| "PADDB": "PADDB", | |||
| }, | |||
| error: { | |||
| 0: "不明なエラーです", | |||
| 1: "サポートされていない形式。" , | |||
| 2: "チームデータがありません" , | |||
| 3: "間違った JSON 形式です。" , | |||
| 4: "間違った URL 形式です。 ", | |||
| } | |||
| }, | |||
| paddb_success: `操作は成功`, | |||
| paddb_unauthorized: `認証に失敗しました (アカウントまたはパスワードが正しくありません)`, | |||
| }, | |||
| sort_name:{ | |||
| sort_none: "いいえ", | |||
| @@ -1,6 +1,6 @@ | |||
| @charset "utf-8"; | |||
| .status.loading-check-version .text::before{ | |||
| content: "데이터 버전을 확인 합니다."; | |||
| content: "데이터 버전을 확인 ."; | |||
| } | |||
| .status.loading-mon-info .text::before{ | |||
| content: "몬스터 데이터를 로드 하 고 있습니다."; | |||
| @@ -327,7 +327,7 @@ label[for="default-level"]::after | |||
| content: "슈퍼 각성 포함"; | |||
| } | |||
| .search-box .show-official-awoken-sorting-label::after{ | |||
| content: "공식 각성 순서를 사용합니다"; | |||
| content: "공식 각성 순서를 사용"; | |||
| } | |||
| .search-box .search-list-length::before{ | |||
| content: "결과 수:"; | |||
| @@ -443,7 +443,7 @@ label[for="have-8-latent-slot"]::after | |||
| } | |||
| .real-time-change-card-label::after | |||
| { | |||
| content: "카드를 즉시 업데이트합니다"; | |||
| content: "카드를 즉시 업데이트"; | |||
| } | |||
| .base .evo-type::before, | |||
| .base .evo-type::after | |||
| @@ -506,7 +506,7 @@ label[for="have-8-latent-slot"]::after | |||
| } | |||
| .control-box .btn-qrcode::before{ | |||
| content: "\f029 QR 코드"; | |||
| content: "\f029 QR 코드 및 \f0ec 데이터 교환"; | |||
| } | |||
| .read-qr-box::before | |||
| @@ -536,20 +536,44 @@ label[for="sourceSelect"]::before | |||
| } | |||
| #qr-code-frame .read-qr-camera.running::before | |||
| { | |||
| content: "\f28d 카메라 사용을 중지합니다"; | |||
| content: "\f28d 카메라 사용을 중지"; | |||
| } | |||
| #qr-code-frame .read-qr-file::before | |||
| { | |||
| content: "\f1c5 이미지 파일 읽기"; | |||
| } | |||
| #qr-code-frame .read-external-link::before | |||
| { | |||
| content: "\f0c1 PADDB 링크 구문 분석"; | |||
| } | |||
| #qr-code-frame .read-string::before { | |||
| content: "\f891 문자열을 읽습니다"; | |||
| } | |||
| #qr-code-frame .paddb-team-edit::before | |||
| { | |||
| content: "팀 데이터를 PADDB에 업로드하려면 다음을 수행."; | |||
| } | |||
| label[for="paddb-username"]::before | |||
| { | |||
| content: "PADDB 사용자 ID:"; | |||
| } | |||
| label[for="paddb-password"]::before | |||
| { | |||
| content: "PADDB 암호:"; | |||
| } | |||
| label[for="paddb-team-id"]::before | |||
| { | |||
| content: "PADDB 팀 링크:"; | |||
| } | |||
| #paddb-save-or-upload-team::before | |||
| { | |||
| content: "저장"; | |||
| } | |||
| #paddb-team-id:placeholder-shown+#paddb-save-or-upload-team::before { | |||
| content: "새 팀을 업로드"; | |||
| } | |||
| body:not(.external-link-support) #external-support::before | |||
| { | |||
| content: "\f552 PADDB 관련 기능을 사용하도록 보조 스크립트를 설치"; | |||
| } | |||
| label[for="qr-data-type-pdf"]::before | |||
| { | |||
| content: "퍼즐앤드래곤 대시 형성"; | |||
| @@ -559,7 +583,11 @@ label[for="qr-data-type-pdc"]::before | |||
| content: "퍼즐앤드래곤 데미지 카큐라터 (PDC)"; | |||
| } | |||
| label[for="qr-data-type-pdchu"]::before { | |||
| content: "Valeria(pdchu)"; | |||
| content: "Valeria (pdchu)"; | |||
| } | |||
| label[for="qr-data-type-paddb"]::before | |||
| { | |||
| content: "PADDB (솔로 전용)"; | |||
| } | |||
| #btn-set-dungeon-enchance::before | |||
| { | |||
| @@ -595,7 +623,7 @@ label[for="qr-data-type-pdchu"]::before { | |||
| } | |||
| .dialog-dungeon-enchance .stats-list::before | |||
| { | |||
| content: "배율을 강화합니다:"; | |||
| content: "배율을 강화:"; | |||
| } | |||
| #player-data-frame .player-box-title::before | |||
| @@ -1,13 +1,12 @@ | |||
| const _localTranslating = { | |||
| webpage_title: `퍼즐앤드래곤 ${teamsCount} 명의 팀 다이어그램 작성 도구`, | |||
| addition_display: "추가 표시입니다", | |||
| title_blank: "입력 제목", | |||
| detail_blank: "입력 내용", | |||
| force_reload_data: "데이터 강제 새로 고침", | |||
| request_input: tp`${'info'}를 입력하십시오`, | |||
| link_read_message: { | |||
| success: tp`검색 ${'type'} 형식입니다. `, | |||
| need_user_script: `PADDB는 도메인에 걸쳐 있으므로 이 기능을 지원하려면 사용자 스크립트 관리자 내에 이 보조 스크립트를 설치해야 합니다.`, | |||
| need_user_script: `PADDB는 도메인에 걸쳐 있으므로 이 기능을 지원하려면 사용자 스크립트 관리자 내에 보조 스크립트를 설치해야 합니다.`, | |||
| user_script_link: `스크립트에 연결`, | |||
| type: { | |||
| "PADDF": "PADDF", | |||
| @@ -15,11 +14,14 @@ | |||
| "PADDB": "PADDB", | |||
| }, | |||
| error: { | |||
| 0: "알 수 없는 오류입니다", | |||
| 1: "지원되지 않는 형식입니다." , | |||
| 2: "팀 데이터가 없습니다." , | |||
| 3: "잘못된 JSON 형식입니다." , | |||
| 4: "잘못된 URL 형식입니다." , | |||
| } | |||
| }, | |||
| paddb_success: `작업이 성공했습니다`, | |||
| paddb_unauthorized: `인증 실패(계정 번호 또는 잘못된 암호)`, | |||
| }, | |||
| sort_name:{ | |||
| sort_none: "없음", | |||
| @@ -516,7 +516,7 @@ label[for="box-have"]::after | |||
| } | |||
| .control-box .btn-qrcode::before{ | |||
| content: "\f029 二維碼"; | |||
| content: "\f029 二維碼 和 \f0ec 數據交換"; | |||
| } | |||
| .read-qr-box::before | |||
| @@ -558,24 +558,52 @@ label[for="sourceSelect"]::before | |||
| { | |||
| content: "\f1c5 讀取二維碼圖片"; | |||
| } | |||
| #qr-code-frame .read-external-link::before | |||
| { | |||
| content: "\f0c1 解析 PADDB 鏈接"; | |||
| } | |||
| #qr-code-frame .read-string::before { | |||
| content: "\f891 读取字符串"; | |||
| } | |||
| #qr-code-frame .paddb-team-edit::before | |||
| { | |||
| content: "將隊伍數據上傳至 PADDB:"; | |||
| } | |||
| label[for="paddb-username"]::before | |||
| { | |||
| content: "PADDB 用戶名:"; | |||
| } | |||
| label[for="paddb-password"]::before | |||
| { | |||
| content: "PADDB 密碼:"; | |||
| } | |||
| label[for="paddb-team-id"]::before | |||
| { | |||
| content: "PADDB 隊伍鏈接:"; | |||
| } | |||
| #paddb-save-or-upload-team::before | |||
| { | |||
| content: "保存"; | |||
| } | |||
| #paddb-team-id:placeholder-shown+#paddb-save-or-upload-team::before { | |||
| content: "上傳新隊伍"; | |||
| } | |||
| body:not(.external-link-support) #external-support::before | |||
| { | |||
| content: "\f552 安裝輔助腳本以使用 PADDB 相關功能"; | |||
| } | |||
| label[for="qr-data-type-pdf"]::before | |||
| { | |||
| content: "龍圖急速陣型"; | |||
| } | |||
| label[for="qr-data-type-pdc"]::before | |||
| { | |||
| content: "龍族拼圖傷害計算器(PDC)"; | |||
| content: "龍族拼圖傷害計算器 (PDC)"; | |||
| } | |||
| label[for="qr-data-type-pdchu"]::before { | |||
| content: "Valeria(pdchu)"; | |||
| content: "Valeria (pdchu)"; | |||
| } | |||
| label[for="qr-data-type-paddb"]::before | |||
| { | |||
| content: "PADDB (僅單人)"; | |||
| } | |||
| #btn-set-dungeon-enchance::before | |||
| { | |||
| @@ -6,18 +6,22 @@ | |||
| request_input: tp`請輸入${'info'}`, | |||
| link_read_message: { | |||
| success: tp`發現 ${'type'} 格式。`, | |||
| need_user_script: `由於 PADDB 跨域,您需要在用戶腳本管理器內安裝此輔助腳本以支持此功能。`, | |||
| need_user_script: `由於 PADDB 跨域,您需要在用戶腳本管理器內安裝輔助腳本以支持此功能。`, | |||
| user_script_link: `輔助腳本的鏈接`, | |||
| type: { | |||
| "PADDF": "龍圖急速陣型", | |||
| "PADDF": "智龍急速陣型", | |||
| "PDC": "PDC", | |||
| "PADDB": "PADDB", | |||
| }, | |||
| error: { | |||
| 1: "No formation data.", | |||
| 2: "The illegal JSON format.", | |||
| 3: "The illegal URL format.", | |||
| } | |||
| 0: "未知錯誤", | |||
| 1: "不支持的格式", | |||
| 2: "無隊伍數據", | |||
| 3: "錯誤的 JSON 格式", | |||
| 4: "錯誤的 網址 格式", | |||
| }, | |||
| paddb_success: `操作成功`, | |||
| paddb_unauthorized: `認證失敗(賬號或密碼錯誤)`, | |||
| }, | |||
| sort_name:{ | |||
| sort_none: "無", | |||
| @@ -556,6 +556,9 @@ label[for="sourceSelect"]::before | |||
| { | |||
| content: "\f1c5 读取二维码图片"; | |||
| } | |||
| #qr-code-frame .read-string::before { | |||
| content: "\f891 读取字符串"; | |||
| } | |||
| #qr-code-frame .paddb-team-edit::before | |||
| { | |||
| @@ -571,7 +574,7 @@ label[for="paddb-password"]::before | |||
| } | |||
| label[for="paddb-team-id"]::before | |||
| { | |||
| content: "PADDB 队伍 ID:"; | |||
| content: "PADDB 队伍链接:"; | |||
| } | |||
| #paddb-save-or-upload-team::before | |||
| { | |||
| @@ -584,13 +587,6 @@ body:not(.external-link-support) #external-support::before | |||
| { | |||
| content: "\f552 安装辅助脚本以使用 PADDB 相关功能"; | |||
| } | |||
| #qr-code-frame .read-external-link::before | |||
| { | |||
| content: "\f0c1 解析 PADDB 链接"; | |||
| } | |||
| #qr-code-frame .read-string::before { | |||
| content: "\f891 读取字符串"; | |||
| } | |||
| label[for="qr-data-type-pdf"]::before | |||
| { | |||
| @@ -598,10 +594,14 @@ label[for="qr-data-type-pdf"]::before | |||
| } | |||
| label[for="qr-data-type-pdc"]::before | |||
| { | |||
| content: "智龙迷城伤害计算器(PDC)"; | |||
| content: "智龙迷城伤害计算器 (PDC)"; | |||
| } | |||
| label[for="qr-data-type-pdchu"]::before { | |||
| content: "Valeria(pdchu)"; | |||
| content: "Valeria (pdchu)"; | |||
| } | |||
| label[for="qr-data-type-paddb"]::before | |||
| { | |||
| content: "PADDB (仅单人)"; | |||
| } | |||
| #btn-set-dungeon-enchance::before | |||
| { | |||
| @@ -6,7 +6,7 @@ | |||
| request_input: tp`请输入${'info'}`, | |||
| link_read_message: { | |||
| success: tp`发现 ${'type'} 格式。`, | |||
| need_user_script: `由于 PADDB 跨域,您需要在用户脚本管理器内安装此辅助脚本以支持此功能。`, | |||
| need_user_script: `由于 PADDB 跨域,您需要在用户脚本管理器内安装辅助脚本以支持此功能。`, | |||
| user_script_link: `辅助脚本的链接`, | |||
| type: { | |||
| "PADDF": "智龙急速阵型", | |||
| @@ -14,11 +14,14 @@ | |||
| "PADDB": "PADDB", | |||
| }, | |||
| error: { | |||
| 1: "不支持的格式。", | |||
| 2: "无队伍数据。", | |||
| 3: "错误的 JSON 格式。", | |||
| 4: "错误的 网址 格式。", | |||
| } | |||
| 0: "未知错误", | |||
| 1: "不支持的格式", | |||
| 2: "无队伍数据", | |||
| 3: "错误的 JSON 格式", | |||
| 4: "错误的 网址 格式", | |||
| }, | |||
| paddb_success: `操作成功`, | |||
| paddb_unauthorized: `认证失败(账号或密码错误)`, | |||
| }, | |||
| sort_name:{ | |||
| sort_none: "无", | |||
| @@ -1325,7 +1325,6 @@ var formation = new Formation(teamsCount,5); | |||
| </svg> | |||
| <div id="qr-code-frame" class="mask display-none"> | |||
| <button class="mask-close brown-button"></button> | |||
| <button id="external-support" class="brown-button"></button> | |||
| <div class="mask-content"> | |||
| <div class="read-qr-box"> | |||
| <div class="action-button-box"> | |||
| @@ -1348,8 +1347,9 @@ var formation = new Formation(teamsCount,5); | |||
| </div> | |||
| <div class="save-qr-box"> | |||
| <ul class="qr-data-type-ul"> | |||
| <li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdf" id="qr-data-type-pdf" checked/><label for="qr-data-type-pdf"></label></li><!--本程序 | |||
| --><li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdc" id="qr-data-type-pdc" /><label for="qr-data-type-pdc"></label></li><!--PDC--> | |||
| <li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="paddf" id="qr-data-type-pdf" checked/><label for="qr-data-type-pdf"></label></li><!--本程序 | |||
| --><li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdc" id="qr-data-type-pdc" /><label for="qr-data-type-pdc"></label></li><!--PDC | |||
| --><li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="paddb" id="qr-data-type-paddb" /><label for="qr-data-type-paddb"></label></li><!--PADDB--> | |||
| </ul> | |||
| <input class="string-output" type="text" readonly/> | |||
| <div class="qr-box"><img class="qr-code-image" /></div> | |||
| @@ -1361,11 +1361,12 @@ var formation = new Formation(teamsCount,5); | |||
| <label for="paddb-password"></label><input id="paddb-password" type="password" placeholder="password (4~20)"> | |||
| </div> | |||
| <div class="action"> | |||
| <label for="paddb-team-id"></label><input id="paddb-team-id" type="text" placeholder="Team ID"> | |||
| <label for="paddb-team-id"></label><input id="paddb-team-id" type="text" placeholder="Team URL"> | |||
| <button id="paddb-save-or-upload-team" class="brown-button"></button> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <a id="external-support" class="brown-button" href=""></a> | |||
| </div> | |||
| <div class="dialog dialog-dungeon-enchance display-none"> | |||
| @@ -21,7 +21,7 @@ let localTranslating = { | |||
| request_input: tp`Please Input ${'info'}`, | |||
| link_read_message: { | |||
| success: tp`Find the ${'type'} format.`, | |||
| need_user_script: `Because PADDB is cross-domain, you need to install this helper script within the User Script Manager to support this feature.`, | |||
| need_user_script: `Because PADDB is cross-domain, you need to install helper script within the User Script Manager to support this feature.`, | |||
| user_script_link: `Link to the helper script`, | |||
| type: { | |||
| "PADDF": "PADDF", | |||
| @@ -29,11 +29,14 @@ let localTranslating = { | |||
| "PADDB": "PADDB", | |||
| }, | |||
| error: { | |||
| 1: "Unsupported format.", | |||
| 2: "No formation data.", | |||
| 3: "The illegal JSON format.", | |||
| 4: "The illegal URL format.", | |||
| } | |||
| 0: "Unknown Error", | |||
| 1: "Unsupported format", | |||
| 2: "No formation data", | |||
| 3: "The illegal JSON format", | |||
| 4: "The illegal URL format", | |||
| }, | |||
| paddb_success: `Sucess`, | |||
| paddb_unauthorized: `Certification Faild (ID or password is incorrect)`, | |||
| }, | |||
| sort_name:{ | |||
| sort_none: "Nope", | |||
| @@ -28,6 +28,7 @@ const isGuideMod = !unsupportFeatures.length && Boolean(Number(getQueryString("g | |||
| const PAD_PASS_BADGE = 1<<7 | 1; //月卡徽章编号,129 | |||
| //用油猴扩展装上,把GM_xmlhttpRequest引入的脚本 | |||
| const ExternalLinkScriptURL = "https://greasyfork.org/scripts/458521"; | |||
| const paddbPathPrefix = "/team/"; //PADDB的获取队伍网址格式 | |||
| if (location.search.includes('&')) { | |||
| location.search = location.search.replace(/&/ig, '&'); | |||
| @@ -538,14 +539,77 @@ Formation.prototype.getPdcQrStr = function() | |||
| outArr = outArr.concat(pdcTeamsStr); | |||
| return outArr.join(']'); | |||
| } | |||
| Formation.prototype.getQrStr = function(type) | |||
| Formation.prototype.getPaddbQrObj = function(keepDataSource = true) | |||
| { | |||
| if (type == 'pdf' || type == 0) | |||
| { | |||
| return JSON.stringify(this.getPdfQrObj()); | |||
| }else | |||
| //PADDB目前只支持单人队伍 | |||
| const t = this.teams[0]; | |||
| let teamObj = { | |||
| name: this.title, | |||
| badge: paddbBadgeMap.find(badge=>badge.pdf === t[2]).paddb, | |||
| memo: this.detail, | |||
| monsters: {}, | |||
| assists: {}, | |||
| } | |||
| //返回一个变身角色的变身根ID | |||
| function returnHenshinRootId(mid) | |||
| { | |||
| return this.getPdcQrStr(); | |||
| const m = Cards[mid]; | |||
| if (Array.isArray(m.henshinFrom) && m.henshinFrom[0] < m.id) | |||
| { //只有变身来源小于目前id的,才继续找base | |||
| mid = returnHenshinRootId(m.henshinFrom[0]); | |||
| } | |||
| return mid; | |||
| } | |||
| for (let i = 0; i < t[0].length; i++) { | |||
| const m = t[0][i], a = t[1][i]; | |||
| //计算基底的变身情况 | |||
| let num = m.id, transform = null; | |||
| if (m.card?.henshinFrom?.length > 0 //是变身 | |||
| && m.level <= m.card.maxLevel //等级不超过99 | |||
| ) { | |||
| transform = m.id; | |||
| num = returnHenshinRootId(m.id); | |||
| } | |||
| teamObj.monsters[i] = m.id <= 0 ? null : { | |||
| num: num, | |||
| level: m.level, | |||
| awoken: m.awoken, | |||
| plus: m.plus.concat(), | |||
| active_skill_level: m.skilllevel ?? Skills[m.card.activeSkillId].maxLevel, | |||
| transform: transform, | |||
| super_awoken: m.sawoken + 2, | |||
| latent_awokens: m.latent.map(n=>paddbLatentMap.find(latent=>latent.pdf === n).paddb), | |||
| }; | |||
| teamObj.assists[i] = a.id <= 0 ? null : { | |||
| num: a.id, | |||
| level: a.level, | |||
| plus: a.plus.every(n=>n>=99), //只需要true和false | |||
| active_skill_level: a.skilllevel ?? Skills[a.card.activeSkillId].maxLevel, | |||
| }; | |||
| } | |||
| let qrObj = { | |||
| // userId:"", | |||
| // password:"", | |||
| name: this.title, | |||
| // "tags":[""], | |||
| mons: t[0].concat(t[1]).map(m=>m.id > 0 ? m.id : ""), | |||
| team: JSON.stringify(teamObj), | |||
| }; | |||
| return qrObj; | |||
| } | |||
| Formation.prototype.getQrStr = function(type) | |||
| { | |||
| switch (type) { | |||
| case 'paddf': { | |||
| return JSON.stringify(this.getPdfQrObj()); | |||
| } | |||
| case 'paddb': { | |||
| return JSON.stringify(this.getPaddbQrObj()); | |||
| } | |||
| case 'pdc': | |||
| default: { | |||
| return this.getPdcQrStr(); | |||
| } | |||
| } | |||
| } | |||
| Formation.prototype.removeAssist = function() { | |||
| @@ -555,7 +619,7 @@ Formation.prototype.removeAssist = function() { | |||
| assists[i] = new MemberAssist(); | |||
| } | |||
| }); | |||
| creatNewUrl(); | |||
| createNewUrl(); | |||
| refreshAll(formation); | |||
| } | |||
| @@ -744,6 +808,7 @@ class EvoTree | |||
| this.parent = parent; | |||
| if (parent == null) //如果没有提供父级,则寻找进化根 | |||
| { | |||
| //返回一个角色的根ID | |||
| function returnRootId(mid) | |||
| { | |||
| mid = Cards[mid].evoRootId; | |||
| @@ -972,6 +1037,7 @@ function clearData() | |||
| const locationURL = new URL(location); | |||
| locationURL.searchParams.delete('d'); //删除数据 | |||
| locationURL.searchParams.delete('l'); //删除语言 | |||
| locationURL.searchParams.delete('_id'); //删除PADDB的ID | |||
| location = locationURL.toString(); | |||
| } | |||
| //轮换ABC队伍 | |||
| @@ -979,7 +1045,7 @@ function swapABCteam() | |||
| { | |||
| if (formation.teams.length > 1) { | |||
| formation.teams.push(formation.teams.splice(0, 1)[0]); //将队伍1移动到最后 | |||
| creatNewUrl(); | |||
| createNewUrl(); | |||
| refreshAll(formation); | |||
| } | |||
| } | |||
| @@ -1016,7 +1082,7 @@ function henshinStep(step) | |||
| }); | |||
| }); | |||
| creatNewUrl(); | |||
| createNewUrl(); | |||
| refreshAll(formation); | |||
| } | |||
| //在单人和多人之间转移数据 | |||
| @@ -1066,7 +1132,7 @@ function turnPage(toPage, e = null) { | |||
| pagename = "triple.html"; | |||
| break; | |||
| } | |||
| const newURL = creatNewUrl({ url: pagename, notPushState: true }); | |||
| const newURL = createNewUrl({ url: pagename, notPushState: true }); | |||
| if (e && e.ctrlKey) { | |||
| window.open(newURL); | |||
| } else { | |||
| @@ -1346,6 +1412,12 @@ function reloadFormationData(event) { | |||
| } | |||
| } | |||
| formation.loadObj(formationData); | |||
| const _id = getQueryString("_id"); | |||
| if (_id) { | |||
| const paddbTeamId = document.querySelector("#paddb-team-id"); | |||
| paddbTeamId.value = `https://paddb.net/team/${_id}`; | |||
| } | |||
| //编辑模式直接打开编辑框 | |||
| let editingTarget = ((str)=>{ | |||
| @@ -1399,11 +1471,12 @@ function reloadFormationData(event) { | |||
| } | |||
| window.addEventListener('popstate',reloadFormationData); //前进后退时修改页面 | |||
| //创建新的分享地址 | |||
| function creatNewUrl(arg) { | |||
| function createNewUrl(arg) { | |||
| if (arg == undefined) arg = {}; | |||
| if (!!(window.history && history.pushState)) { // 支持History API | |||
| if (window.history?.pushState) { // 支持History API | |||
| const language_i18n = arg.language || getQueryString(["l","lang"]); //获取参数指定的语言 | |||
| const datasource = arg.datasource || getQueryString("s"); | |||
| const _id = arg._id || getQueryString("_id"); | |||
| const outObj = formation.outObj(); | |||
| const newSearch = new URLSearchParams(); | |||
| @@ -1416,6 +1489,7 @@ function creatNewUrl(arg) { | |||
| const dataJsonStr = JSON.stringify(outObj); //数据部分的字符串 | |||
| newSearch.set("d", dataJsonStr); | |||
| } | |||
| if (_id) newSearch.set("_id", _id); | |||
| const newUrl = (arg.url || "") + (newSearch.toString().length > 0 ? '?' + newSearch.toString() : ""); | |||
| @@ -1476,6 +1550,12 @@ async function inputFromQrString(string) | |||
| ERROR_No_formation_data = 2, | |||
| ERROR_illegal_JSON_format = 3, | |||
| ERROR_illegal_URL_format = 4; | |||
| function paddbObjToURL(obj) { | |||
| const newFotmation = paddbFotmationToPdfFotmation(obj); | |||
| const qrObj = newFotmation.getPdfQrObj(false); | |||
| qrObj.paddbId = obj._id; | |||
| return qrObjToUrl(qrObj); | |||
| } | |||
| //JSON 类 | |||
| if (string[0] === "{" && string[string.length-1] === "}") | |||
| { //生成的二维码 | |||
| @@ -1488,10 +1568,7 @@ async function inputFromQrString(string) | |||
| } | |||
| else if (typeof obj?.team == "string" && obj.team[0] === "{" && obj.team[obj.team.length-1] === "}") { //PADDB的对象格式 | |||
| re.type = "PADDB"; | |||
| const newFotmation = paddbFotmationToPdfFotmation(obj); | |||
| const qrObj = newFotmation.getPdfQrObj(false); | |||
| qrObj.paddbId = obj._id; | |||
| re.url = qrObjToUrl(qrObj); | |||
| re.url = paddbObjToURL(obj) | |||
| } | |||
| else { | |||
| re.error = ERROR_No_formation_data; | |||
| @@ -1523,23 +1600,29 @@ async function inputFromQrString(string) | |||
| } | |||
| } | |||
| //PADDB 的网址格式,之后要调用脚本功能获取跨域JSON | |||
| else if(/^https?:\/\/paddb\.net\/team\/[a-f0-9]+/i.test(string)) { | |||
| else if(url.host == "paddb.net" && url.pathname.startsWith(paddbPathPrefix)) { | |||
| const teamId = url.pathname.substring(url.pathname.indexOf(paddbPathPrefix) + paddbPathPrefix.length); | |||
| re.type = "PADDB"; | |||
| //re.message = "发现 PADDB 网址 | PADDB URL found"; | |||
| const qrDialog = document.querySelector("#qr-code-frame"); | |||
| const actionButtonBox = qrDialog.querySelector(".action-button-box"); | |||
| const txtStringInput = actionButtonBox.querySelector(".string-input"); //输入的字符串 | |||
| //const btnReadString = actionButtonBox.querySelector(".read-string"); //读取字符串按钮 | |||
| const btnReadExternalLink = actionButtonBox.querySelector(".read-external-link"); | |||
| if (btnReadExternalLink?.readExternalLink) { | |||
| const request = btnReadExternalLink.readExternalLink(string); | |||
| const response = await request; | |||
| const txtStringInput = document.body.querySelector("#qr-code-frame .action-button-box .string-input"); //输入的字符串 | |||
| const btnExternalSupport = document.body.querySelector("#external-support"); | |||
| if (btnExternalSupport?.asyncGM_xmlhttpRequest) { | |||
| let postBody = JSON.stringify({id: teamId}); | |||
| const options = { | |||
| method: "POST", | |||
| url: "https://api2.paddb.net/getTeam", | |||
| data: postBody, | |||
| headers: { | |||
| "Content-Type": "application/json", | |||
| "User-Agent": "okhttp/4.9.2", | |||
| //如果只有ascii字符可以用postBody.length | |||
| "Content-Length": new Blob([postBody], {type: "application/json"}).size, | |||
| } | |||
| }; | |||
| const response = await btnExternalSupport.asyncGM_xmlhttpRequest(options); | |||
| try{ | |||
| let obj = JSON.parse(txtStringInput.value = response.response); | |||
| const newFotmation = paddbFotmationToPdfFotmation(obj); | |||
| const qrObj = newFotmation.getPdfQrObj(false); | |||
| qrObj.paddbId = obj._id; | |||
| re.url = qrObjToUrl(qrObj); | |||
| re.url = paddbObjToURL(obj) | |||
| } catch(error) { | |||
| console.error(error); | |||
| re.error = ERROR_illegal_JSON_format; | |||
| @@ -1577,40 +1660,6 @@ async function inputFromQrString(string) | |||
| //re.message = "不支持的格式 | Unsupported format"; | |||
| } | |||
| return re; | |||
| // //解析PADDB的数据 | |||
| // function FastInputToPdfFotmation(string) | |||
| // { | |||
| // let str = string.replace(/^>\s/,''); | |||
| // let teams = str.split(/\s*,\s*/); | |||
| // const team = JSON.parse(obj.team); | |||
| // console.log(team); | |||
| // const f = new Formation(1, 6); | |||
| // f.title = team.name; | |||
| // f.detail = team.memo; | |||
| // const t = f.teams[0]; | |||
| // //队伍徽章 | |||
| // t[2] = paddbBadgeMap.find(badge=>badge.paddb === team.badge).pdf; | |||
| // const members = t[0], assists = t[1]; | |||
| // for (let i = 0; i< members.length; i++) { | |||
| // const m = members[i], a = assists[i], dm = team.monsters[i], da = team.assists[i]; | |||
| // if (dm) { | |||
| // m.id = dm.transform || dm.num; | |||
| // m.level = dm.level; | |||
| // m.plus = dm.plus.concat(); | |||
| // m.awoken = dm.awoken; | |||
| // m.sawoken = dm.super_awoken - 2; | |||
| // m.latent = dm.latent_awokens.map(paddbLatent=>paddbLatentMap.find(latent=>latent.paddb === paddbLatent)?.pdf ?? 0); | |||
| // m.skilllevel = dm.active_skill_level; | |||
| // } | |||
| // if (da) { | |||
| // a.id = da.num; | |||
| // a.level = da.level; | |||
| // a.plus = da.plus ? [99,99,99]:[0,0,0]; | |||
| // a.skilllevel = da.active_skill_level; | |||
| // } | |||
| // } | |||
| // return f; | |||
| // } | |||
| } | |||
| //解析PDC的数据 | |||
| @@ -1713,7 +1762,9 @@ function paddbFotmationToPdfFotmation(obj) | |||
| m.id = dm.transform || dm.num; | |||
| m.level = dm.level; | |||
| m.plus = dm.plus.concat(); | |||
| m.awoken = dm.awoken; | |||
| m.awoken = (dm.transform && dm.transform !== dm.numdm) //有变身状态时 | |||
| ? Cards[dm.transform].awakenings.length //变身后的觉醒全满 | |||
| : dm.awoken; | |||
| m.sawoken = dm.super_awoken - 2; | |||
| m.latent = dm.latent_awokens.map(paddbLatent=>paddbLatentMap.find(latent=>latent.paddb === paddbLatent)?.pdf ?? 0); | |||
| m.skilllevel = dm.active_skill_level; | |||
| @@ -1721,6 +1772,7 @@ function paddbFotmationToPdfFotmation(obj) | |||
| if (da) { | |||
| a.id = da.num; | |||
| a.level = da.level; | |||
| a.awoken = Cards[da.num].awakenings.length; | |||
| a.plus = da.plus ? [99,99,99]:[0,0,0]; | |||
| a.skilllevel = da.active_skill_level; | |||
| } | |||
| @@ -1918,7 +1970,10 @@ function initialize() { | |||
| } | |||
| qrReadBox.readString.onclick = async function() | |||
| { | |||
| if (qrReadBox.qrStr.value.length === 0) return; | |||
| this.disabled = true; | |||
| let inputResult = await inputFromQrString(qrReadBox.qrStr.value); | |||
| this.disabled = false; | |||
| let lrm = localTranslating.link_read_message; | |||
| let message; | |||
| if (inputResult.message) { | |||
| @@ -1936,7 +1991,7 @@ function initialize() { | |||
| Boolean(inputResult.error), | |||
| inputResult.url, | |||
| inputResult.urlName | |||
| ) | |||
| ); | |||
| } | |||
| qrSaveBox.qrImage = qrSaveBox.querySelector(".qr-code-image"); | |||
| @@ -2131,6 +2186,9 @@ function initialize() { | |||
| }); | |||
| } | |||
| const btnExternalSupport = qrCodeFrame.querySelector("#external-support"); | |||
| btnExternalSupport.href = ExternalLinkScriptURL; | |||
| const paddbTeamEdit = qrContent.querySelector(".paddb-team-edit"); | |||
| //paddb的用户名和密码 | |||
| const paddbUsername = paddbTeamEdit.querySelector("#paddb-username"); | |||
| @@ -2140,6 +2198,56 @@ function initialize() { | |||
| paddbUsername.onchange = paddbPassword.onchange = function(e){ | |||
| if (e) localStorage.setItem(cfgPrefix + this.id, this.value); | |||
| } | |||
| const paddbTeamId = document.querySelector("#paddb-team-id"); | |||
| paddbTeamId.onchange = function(){ | |||
| try { | |||
| let str = this.value; | |||
| const teamId = str.substring(str.indexOf(paddbPathPrefix) + paddbPathPrefix.length); | |||
| createNewUrl({_id:teamId}); | |||
| } catch (error) { | |||
| console.log(error); | |||
| } | |||
| } | |||
| const paddbSaveOrUpload = document.querySelector("#paddb-save-or-upload-team"); | |||
| paddbSaveOrUpload.onclick = async function(){ | |||
| this.disabled = true; | |||
| const btnExternalSupport = document.body.querySelector("#external-support"); | |||
| if (!btnExternalSupport?.asyncGM_xmlhttpRequest) { | |||
| alert(localTranslating.link_read_message.need_user_script); | |||
| return; | |||
| } | |||
| let obj = formation.getPaddbQrObj(); | |||
| obj.userId = paddbUsername.value; | |||
| obj.password = paddbPassword.value; | |||
| obj.tags = [obj.userId]; | |||
| let postBody = JSON.stringify(obj); | |||
| const options = { | |||
| method: "POST", | |||
| data: postBody, | |||
| headers: { | |||
| "Content-Type": "application/json", | |||
| "User-Agent": "okhttp/4.9.2", | |||
| //如果只有ascii字符可以用postBody.length | |||
| "Content-Length": new Blob([postBody], {type: "application/json"}).size, | |||
| } | |||
| }; | |||
| const isNewUpload = paddbTeamId.value.length === 0; | |||
| if (isNewUpload) { | |||
| options.url = "https://api2.paddb.net/uploadTeam"; | |||
| } else { | |||
| const teamId = paddbTeamId.value.substring(paddbTeamId.value.indexOf(paddbPathPrefix) + paddbPathPrefix.length); | |||
| options.url = `https://api2.paddb.net/editTeam/${teamId}`; | |||
| } | |||
| const response = await btnExternalSupport.asyncGM_xmlhttpRequest(options); | |||
| if (response.status === 401) { | |||
| alert(localTranslating.link_read_message.paddb_unauthorized); | |||
| } else if (response.status === 200) { | |||
| alert(localTranslating.link_read_message.paddb_success); | |||
| } else { | |||
| alert(localTranslating.link_read_message.error[0]); | |||
| } | |||
| this.disabled = false; | |||
| } | |||
| const playerDataFrame = document.body.querySelector("#player-data-frame"); | |||
| const btnPlayerData = controlBox.querySelector(`.btn-player-data`); | |||
| @@ -2548,7 +2656,7 @@ function initialize() { | |||
| } | |||
| formation.title = txtTitle.value = richTextToCode(this).replaceAll('\n',''); | |||
| formationBox.refreshDocumentTitle(); | |||
| creatNewUrl(); | |||
| createNewUrl(); | |||
| } | |||
| txtDetailDisplay.onblur = function(){ | |||
| //没有内容或者只有一个换行时,清空内容 | |||
| @@ -2556,20 +2664,20 @@ function initialize() { | |||
| this.innerHTML = ''; | |||
| } | |||
| formation.detail = txtDetail.value = richTextToCode(this); | |||
| creatNewUrl(); | |||
| createNewUrl(); | |||
| } | |||
| txtTitle.onchange = function() { | |||
| formation.title = this.value; | |||
| txtTitleDisplay.innerHTML = ''; | |||
| txtTitleDisplay.append(descriptionToHTML(this.value)); | |||
| formationBox.refreshDocumentTitle(); | |||
| creatNewUrl(); | |||
| createNewUrl(); | |||
| }; | |||
| txtDetail.onchange = function() { | |||
| formation.detail = this.value; | |||
| txtDetailDisplay.innerHTML = ''; | |||
| txtDetailDisplay.append(descriptionToHTML(this.value)); | |||
| creatNewUrl(); | |||
| createNewUrl(); | |||
| }; | |||
| //设置为可以拖放已经编辑好的队伍 | |||
| function richTextDropHandler(event) { | |||
| @@ -2755,7 +2863,7 @@ function initialize() { | |||
| formation.teams[toTeamNum][toIsAssist][toIndexInTeam] = from; | |||
| if (!isCopy) formation.teams[fromTeamNum][fromIsAssist][fromIndexInTeam] = to; | |||
| creatNewUrl(); //刷新URL | |||
| createNewUrl(); //刷新URL | |||
| refreshAll(formation); //刷新全部 | |||
| } | |||
| function switchLeader(e) | |||
| @@ -2791,7 +2899,7 @@ function initialize() { | |||
| team[3] = arr[2]; //接换成新队长 | |||
| } | |||
| } | |||
| creatNewUrl(); //刷新URL | |||
| createNewUrl(); //刷新URL | |||
| refreshAll(formation); //刷新全部 | |||
| e.stopPropagation(); | |||
| @@ -2830,7 +2938,7 @@ function initialize() { | |||
| team[2] = parseInt(this.value, 10); | |||
| const teamTotalInfoDom = teamBigBox.querySelector(".team-total-info"); //队伍能力值合计 | |||
| refreshTeamTotalHP(teamTotalInfoDom, team, teamIdx); | |||
| creatNewUrl(); | |||
| createNewUrl(); | |||
| } else { | |||
| teamBadge.classList.add(className_ChoseBadges); | |||
| } | |||
| @@ -2988,7 +3096,7 @@ function initialize() { | |||
| dge.gachas = gachaIdIpt.value.split(',').map(str=>Number(str)).filter(Boolean); | |||
| dungeonEnchanceDialog.close(); | |||
| creatNewUrl(); | |||
| createNewUrl(); | |||
| refreshAll(formation); | |||
| }; | |||
| const dungeonEnchanceDialogClear = dungeonEnchanceDialog.querySelector(".dialog-clear"); | |||
| @@ -4327,7 +4435,7 @@ function initialize() { | |||
| refreshMemberSkillCD(teamBox, teamData, editBox.memberIdx[2]); | |||
| } | |||
| creatNewUrl(); | |||
| createNewUrl(); | |||
| editBox.hide(); | |||
| }; | |||
| window.addEventListener("keydown",function(event) { | |||
| @@ -4369,7 +4477,7 @@ function initialize() { | |||
| refreshAll(formation); | |||
| creatNewUrl(); | |||
| createNewUrl(); | |||
| editBox.hide(); | |||
| }; | |||
| btnDelay.onclick = function() { //应对威吓 | |||
| @@ -4403,20 +4511,20 @@ function initialize() { | |||
| //刷新改队员的CD | |||
| refreshMemberSkillCD(teamBigBox, teamData, editBox.memberIdx[2]); | |||
| creatNewUrl(); | |||
| createNewUrl(); | |||
| editBox.hide(); | |||
| }; | |||
| //语言选择 | |||
| const langList = controlBox.querySelector(".languages"); | |||
| langList.onchange = function() { | |||
| creatNewUrl({ "language": this.value }); | |||
| createNewUrl({ "language": this.value }); | |||
| history.go(); | |||
| }; | |||
| //数据源选择 | |||
| const dataList = controlBox.querySelector(".datasource"); | |||
| dataList.onchange = function() { | |||
| creatNewUrl({ datasource: this.value }); | |||
| createNewUrl({ datasource: this.value }); | |||
| history.go(); | |||
| }; | |||
| @@ -4432,13 +4540,12 @@ function initialize() { | |||
| //if (monstersID.value.length == 0) editBoxChangeMonId(0); | |||
| } | |||
| } | |||
| //搜出一个卡片包含变身的的完整进化树,用于平铺显示 | |||
| function buildEvoTreeIdsArray(card, includeHenshin = true) { | |||
| function idToCard(id) {return Cards[id]} | |||
| function loopAddHenshin(card, cardSet) | |||
| { | |||
| function idToCard(id) {return Cards[id]} | |||
| function filterCard(_card) { | |||
| return _card && !cardSet.has(_card); | |||
| } | |||
| @@ -387,7 +387,7 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "images/cards_ja/CARDS_097.PNG", | |||
| "dca0c16718379a8ee2e43cfdad815e55" | |||
| "d2705248cbdb75314d5a9720b15c1133" | |||
| ], | |||
| [ | |||
| "sound/voice/ja/padv001.wav", | |||
| @@ -3669,6 +3669,18 @@ const cachesMap = new Map([ | |||
| "sound/voice/ja/padv825.wav", | |||
| "21e944d995ae180c27851336b11dd34d" | |||
| ], | |||
| [ | |||
| "sound/voice/ja/padv826.wav", | |||
| "b0c1b0d91d54dc6ee8ccf2eea2ba0436" | |||
| ], | |||
| [ | |||
| "sound/voice/ja/padv827.wav", | |||
| "ee9a5c640125a2259c58b445db5b1bb0" | |||
| ], | |||
| [ | |||
| "sound/voice/ja/padv828.wav", | |||
| "eab765585155ab27b331075c629f2a02" | |||
| ], | |||
| [ | |||
| "images/cards_en/CARDS_001.PNG", | |||
| "9474808fdb638caac08664cb7a7397e6" | |||
| @@ -8051,7 +8063,7 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "browser-compatibility.js", | |||
| "1d3c87e415212a226eb81ed0de77e4ed" | |||
| "36903e3a30e841cc2d1c6dc413fc1143" | |||
| ], | |||
| [ | |||
| "index.html", | |||
| @@ -8059,7 +8071,7 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "multi.html", | |||
| "2a9044e1ed123093a4b70d0b07164662" | |||
| "471ac44aef472aa0f1cfe3bf4fe6dd52" | |||
| ], | |||
| [ | |||
| "script-custom_elements.js", | |||
| @@ -8067,7 +8079,7 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "script-json_data.js", | |||
| "b92fe1f20c46fac4a0d446520c0fe521" | |||
| "bbb482f9cccec94a3fcce4c9109a8f0a" | |||
| ], | |||
| [ | |||
| "script-skill-parser.js", | |||
| @@ -8079,11 +8091,11 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "script.js", | |||
| "3eb1cffc7f05db75fce5cec377c4320a" | |||
| "afd1b8136c41a5dd3a9a0f062532196b" | |||
| ], | |||
| [ | |||
| "solo.html", | |||
| "9525defd39f2d93ab421200bb38638ac" | |||
| "f6c82f0d0bb00cf18cfb7f4d09639e8f" | |||
| ], | |||
| [ | |||
| "style-monsterimages.css", | |||
| @@ -8091,7 +8103,7 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "style.css", | |||
| "788f5e3725d3f02b5e79627f8f43cb26" | |||
| "80c278fc3294d8a9b4a00ccc6c555631" | |||
| ], | |||
| [ | |||
| "temp.js", | |||
| @@ -8099,11 +8111,11 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "triple.html", | |||
| "fe7bb80b2f946a477a12b446ab265c5a" | |||
| "ffa058b5503450f9a9d8e30893050a85" | |||
| ], | |||
| [ | |||
| "languages/en.css", | |||
| "01a71b977730cf42b84b0274d9bf8186" | |||
| "0e307553e3be48fb29de5bce6924d023" | |||
| ], | |||
| [ | |||
| "languages/en.js", | |||
| @@ -8111,19 +8123,19 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "languages/ja.css", | |||
| "25b3cc9706399d8d0465bae3e1706a9d" | |||
| "db33a415d46db7374fd515446de29ddb" | |||
| ], | |||
| [ | |||
| "languages/ja.js", | |||
| "2021d7816a1e93a61c13681f919ae516" | |||
| "af299de66ed04a21158ee6e8598659fa" | |||
| ], | |||
| [ | |||
| "languages/ko.css", | |||
| "019d037cd2d06e4fa4bc13ea247bd34b" | |||
| "c92fabeca91f3e045ba11c77795f04fd" | |||
| ], | |||
| [ | |||
| "languages/ko.js", | |||
| "431a22bfe0a1c1da77a12445ab278a6d" | |||
| "1b44d13355077fcf8a032d82a3056c22" | |||
| ], | |||
| [ | |||
| "languages/language-list.js", | |||
| @@ -8139,19 +8151,19 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "languages/zh-TW.css", | |||
| "fb8476fc546ffb285f2f16a7f90f0fab" | |||
| "23387b734f568a2b37381d4f62d0b820" | |||
| ], | |||
| [ | |||
| "languages/zh-TW.js", | |||
| "cdfdc37822c99ce8ed1cf5317c0e6381" | |||
| "4ffa03c49bc1541ea99ce236c4d8c7ee" | |||
| ], | |||
| [ | |||
| "languages/zh.css", | |||
| "0cc3ab916b3f45139138c7712a2e2096" | |||
| "a81d9fa1cad525c2825535661ecb7536" | |||
| ], | |||
| [ | |||
| "languages/zh.js", | |||
| "c07e6af7ed7109dbea79526b6cd4ec77" | |||
| "23f5c84f17523c730c68cd2f9ab5c63b" | |||
| ], | |||
| [ | |||
| "images/attrs.png", | |||
| @@ -8323,7 +8335,7 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "monsters-info/ckey.json", | |||
| "3907edd11fce9ead16e4fdd303a527b4" | |||
| "4f444c434a51a580963939d3898fafa3" | |||
| ], | |||
| [ | |||
| "monsters-info/mon_en.json", | |||
| @@ -8331,7 +8343,7 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "monsters-info/mon_ja.json", | |||
| "0b7f14388e4a6f78e246038721b45400" | |||
| "b57685b43d7a3bdb3a7f8bd4c04f7871" | |||
| ], | |||
| [ | |||
| "monsters-info/mon_ko.json", | |||
| @@ -8339,11 +8351,11 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "monsters-info/skill_en.json", | |||
| "486d6a5a49f8cac5b34f78e5b2b1c3af" | |||
| "9f7dd0a1ac30289521a129cbd7e8af5f" | |||
| ], | |||
| [ | |||
| "monsters-info/skill_ja.json", | |||
| "08ef15d3be53fa316536731812d15b8e" | |||
| "e0582f2b94142d3a877ad148e36e74e6" | |||
| ], | |||
| [ | |||
| "monsters-info/skill_ko.json", | |||
| @@ -8355,7 +8367,7 @@ const cachesMap = new Map([ | |||
| ], | |||
| [ | |||
| "doc/index.html", | |||
| "31e760f0569061597832fc91187f2d9f" | |||
| "b76648dd229ac25cfe97e670cf925ba9" | |||
| ], | |||
| [ | |||
| "doc/images/player-bind-box.webp", | |||
| @@ -8573,6 +8585,30 @@ const cachesMap = new Map([ | |||
| "doc/images/tips-interchangeCard.png", | |||
| "42a5d7f2361970fe16b750b92ab6a3c1" | |||
| ], | |||
| [ | |||
| "doc/images/tips-paddb-copy-team-link.png", | |||
| "d9c9be2f49032d4aff7cc3bb9c79ceaa" | |||
| ], | |||
| [ | |||
| "doc/images/tips-paddb-install-script.webp", | |||
| "12908c73da4051b026d699af5b0f0bca" | |||
| ], | |||
| [ | |||
| "doc/images/tips-paddb-read-link.png", | |||
| "97302425016c0371d1dff061e47d744a" | |||
| ], | |||
| [ | |||
| "doc/images/tips-paddb-search-team-in-paddb.png", | |||
| "669d0f5c6e56496dcaef020128869b41" | |||
| ], | |||
| [ | |||
| "doc/images/tips-paddb-upload-region.png", | |||
| "18f4a144fe56b1b5ff260ee530add7e9" | |||
| ], | |||
| [ | |||
| "doc/images/tips-paddb-upload-team-in-paddb.png", | |||
| "263b69acc202b11ea01cbfa307a90716" | |||
| ], | |||
| [ | |||
| "doc/images/tips-qr-found.png", | |||
| "863a538e9d1bdd74214ee55af9344344" | |||
| @@ -1167,7 +1167,6 @@ var formation = new Formation(teamsCount,6); | |||
| </svg> | |||
| <div id="qr-code-frame" class="mask display-none"> | |||
| <button class="mask-close brown-button"></button> | |||
| <button id="external-support" class="brown-button"></button> | |||
| <div class="mask-content"> | |||
| <div class="read-qr-box"> | |||
| <div class="action-button-box"> | |||
| @@ -1190,8 +1189,9 @@ var formation = new Formation(teamsCount,6); | |||
| </div> | |||
| <div class="save-qr-box"> | |||
| <ul class="qr-data-type-ul"> | |||
| <li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdf" id="qr-data-type-pdf" checked/><label for="qr-data-type-pdf"></label></li><!--本程序 | |||
| --><li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdc" id="qr-data-type-pdc" /><label for="qr-data-type-pdc"></label></li><!--PDC--> | |||
| <li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="paddf" id="qr-data-type-pdf" checked/><label for="qr-data-type-pdf"></label></li><!--本程序 | |||
| --><li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdc" id="qr-data-type-pdc" /><label for="qr-data-type-pdc"></label></li><!--PDC | |||
| --><li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="paddb" id="qr-data-type-paddb" /><label for="qr-data-type-paddb"></label></li><!--PADDB--> | |||
| </ul> | |||
| <input class="string-output" type="text" readonly/> | |||
| <div class="qr-box"><img class="qr-code-image" /></div> | |||
| @@ -1203,11 +1203,12 @@ var formation = new Formation(teamsCount,6); | |||
| <label for="paddb-password"></label><input id="paddb-password" type="password" placeholder="password (4~20)"> | |||
| </div> | |||
| <div class="action"> | |||
| <label for="paddb-team-id"></label><input id="paddb-team-id" type="text" placeholder="Team ID"> | |||
| <label for="paddb-team-id"></label><input id="paddb-team-id" type="text" placeholder="Team URL"> | |||
| <button id="paddb-save-or-upload-team" class="brown-button"></button> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <a id="external-support" class="brown-button" href=""></a> | |||
| </div> | |||
| <div class="dialog dialog-dungeon-enchance display-none"> | |||
| @@ -3360,11 +3360,8 @@ body.external-link-support #external-support{ | |||
| /*装了插件的不显示请求装插件的消息*/ | |||
| display: none; | |||
| } | |||
| #qr-code-frame #external-support { | |||
| float: right; | |||
| } | |||
| #paddb-team-id { | |||
| width: 200px; | |||
| width: 350px; | |||
| } | |||
| .qr-data-type-ul .qr-data-type-radio | |||
| @@ -2227,7 +2227,6 @@ var formation = new Formation(teamsCount,6); | |||
| </svg> | |||
| <div id="qr-code-frame" class="mask display-none"> | |||
| <button class="mask-close brown-button"></button> | |||
| <button id="external-support" class="brown-button"></button> | |||
| <div class="mask-content"> | |||
| <div class="read-qr-box"> | |||
| <div class="action-button-box"> | |||
| @@ -2250,8 +2249,9 @@ var formation = new Formation(teamsCount,6); | |||
| </div> | |||
| <div class="save-qr-box"> | |||
| <ul class="qr-data-type-ul"> | |||
| <li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdf" id="qr-data-type-pdf" checked/><label for="qr-data-type-pdf"></label></li><!--本程序 | |||
| --><li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdc" id="qr-data-type-pdc" /><label for="qr-data-type-pdc"></label></li><!--PDC--> | |||
| <li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="paddf" id="qr-data-type-pdf" checked/><label for="qr-data-type-pdf"></label></li><!--本程序 | |||
| --><li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdc" id="qr-data-type-pdc" /><label for="qr-data-type-pdc"></label></li><!--PDC | |||
| --><li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="paddb" id="qr-data-type-paddb" /><label for="qr-data-type-paddb"></label></li><!--PADDB--> | |||
| </ul> | |||
| <input class="string-output" type="text" readonly/> | |||
| <div class="qr-box"><img class="qr-code-image" /></div> | |||
| @@ -2263,11 +2263,12 @@ var formation = new Formation(teamsCount,6); | |||
| <label for="paddb-password"></label><input id="paddb-password" type="password" placeholder="password (4~20)"> | |||
| </div> | |||
| <div class="action"> | |||
| <label for="paddb-team-id"></label><input id="paddb-team-id" type="text" placeholder="Team ID"> | |||
| <label for="paddb-team-id"></label><input id="paddb-team-id" type="text" placeholder="Team URL"> | |||
| <button id="paddb-save-or-upload-team" class="brown-button"></button> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <a id="external-support" class="brown-button" href=""></a> | |||
| </div> | |||
| <div class="dialog dialog-dungeon-enchance display-none"> | |||