Advertisement
Guest User

Untitled

a guest
Sep 8th, 2013
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. From 95f7f98b42818866972e326ce92cb4c264afab50 Mon Sep 17 00:00:00 2001
  2. From: sy <sy@example.com>
  3. Date: Sun, 8 Sep 2013 17:49:14 +0900
  4. Subject: [PATCH] add ship_num,slotitem_num info
  5.  
  6. ---
  7.  chrome/chrome/content/libs.js        |    8 ++++++++
  8.  chrome/chrome/content/mainwindow.xul |   13 +++++++++++++
  9.  chrome/chrome/content/sidebar.xul    |   13 +++++++++++++
  10.  3 files changed, 34 insertions(+), 0 deletions(-)
  11.  
  12. diff --git a/chrome/chrome/content/libs.js b/chrome/chrome/content/libs.js
  13. index cfae4bc..4721577 100644
  14. --- a/chrome/chrome/content/libs.js
  15. +++ b/chrome/chrome/content/libs.js
  16. @@ -176,6 +176,14 @@ function KanColleTimerCallback(request,s){
  17.     let kdocks = document.getElementsByClassName("kdock-box");
  18.     f( ndocks, parseInt(d.api_count_ndock) );
  19.     f( kdocks, parseInt(d.api_count_kdock) );
  20. +    }else if( url.match(/kcsapi\/api_get_member\/record/) ){
  21. +   // 艦隊司令部情報
  22. +   if( data.api_result==1){
  23. +       var ship_str = data.api_data.api_ship[0] + "/"+ data.api_data.api_ship[1];
  24. +       $('ship_num').value = ship_str;
  25. +       var slotitem_str = data.api_data.api_slotitem[0] + "/"+ data.api_data.api_slotitem[1];
  26. +       $('slotitem_num').value = slotitem_str;
  27. +   }
  28.      }
  29.  }
  30.  
  31. diff --git a/chrome/chrome/content/mainwindow.xul b/chrome/chrome/content/mainwindow.xul
  32. index a1cfda9..187a35c 100644
  33. --- a/chrome/chrome/content/mainwindow.xul
  34. +++ b/chrome/chrome/content/mainwindow.xul
  35. @@ -168,6 +168,19 @@
  36.       <label id="kdockremain4" class="kdockremain" value=""/>
  37.     </hbox>
  38.        </groupbox>
  39. +      <groupbox>
  40. +   <caption>情報</caption>
  41. +   <vbox>
  42. +     <hbox>
  43. +       <label value="艦娘数"/>
  44. +       <label id="ship_num" value=""/>
  45. +     </hbox>
  46. +     <hbox>
  47. +       <label value="装備アイテム数"/>
  48. +       <label id="slotitem_num" value=""/>
  49. +     </hbox>
  50. +   </vbox>
  51. +      </groupbox>
  52.        <textbox id="log" placeholder="" multiline="true" flex="1" style="max-height:10em;"/>
  53.      </vbox>
  54.    </stack>
  55. diff --git a/chrome/chrome/content/sidebar.xul b/chrome/chrome/content/sidebar.xul
  56. index 265f55d..74dcd0b 100644
  57. --- a/chrome/chrome/content/sidebar.xul
  58. +++ b/chrome/chrome/content/sidebar.xul
  59. @@ -153,6 +153,19 @@
  60.       <label id="kdockremain4" class="kdockremain" value=""/>
  61.     </hbox>
  62.        </groupbox>
  63. +      <groupbox>
  64. +       <caption>情報</caption>
  65. +       <vbox>
  66. +         <hbox>
  67. +           <label value="艦娘数"/>
  68. +           <label id="ship_num" value=""/>
  69. +         </hbox>
  70. +         <hbox>
  71. +           <label value="装備アイテム数"/>
  72. +           <label id="slotitem_num" value=""/>
  73. +         </hbox>
  74. +       </vbox>
  75. +      </groupbox>
  76.        <textbox id="log" placeholder="" multiline="true" flex="1" />
  77.      </vbox>
  78.    </stack>
  79. --
  80. 1.7.9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement