Skip to content

Instantly share code, notes, and snippets.

@puyo-sh
Last active April 11, 2016 09:51
Show Gist options
  • Save puyo-sh/92bd1f0398388f26e0ec to your computer and use it in GitHub Desktop.
Save puyo-sh/92bd1f0398388f26e0ec to your computer and use it in GitHub Desktop.
/card/trade_bid.php
exhibit_cid:
exhibit_id:
buy_btn:落札する
method:POST
-----------
・内政チェック
 /card/domestic_setting.php
・デッキアップ
 /card/deck.php
 [POST]
ssid:xxxxxx
target_card:123456
mode:set
selected_village[123456]:22222
・内政設定
 /card/domestic_setting.php
 [GET]
id:123456
mode:domestic
・スキル発動
 /card/domestic_setting.php
 [GET]
mode:skill
id:123456
sid:sa0240
・内政解除
 /card/domestic_setting.php
 [GET]
mode:u_domestic
id:123456
・デッキダウン
 /card/deck.php
 [POST]
mode:unset
target_card:123456
ssid:xxxxxx
------
+(skill_lv - 1)
仁君
sd000
弓腰姫の愛
sd001
神医の術式
sd003
傾国
sd004
城壁補強
sd005
優雅な調べ
sd011
皇后の慈愛
sd012
神医の施術
sd013
桃色吐息
sd017
勇姫督励
sd018
劉備の契り
sd022
酔吟吐息
sd026
才女の瞳
sa027
文姫の慈愛
sd032
--不明
熊猫の麺匠
--------
/union/lvup.php?cid=
/union/learn.php?cid=
/union/remove.php?cid=
/union/expup.php?cid=
----
// Gyazo画像表示対応
// ブラウザ三国志用プロフ画像埋め込みスクリプト
// Scripted by KfmAdmin
// http://kfm.netgamers.jp/bura3/script.php
// プロフ,同盟トップのみで実行
if(lp.indexOf('/user/') != -1){
$(".show_comment_cell[rowspan=2]").html(conv($(".show_comment_cell[rowspan=2]").html()));
$(".show_comment_cell[rowspan=2]").next().html(conv($(".show_comment_cell[rowspan=2]").next().html()));
}else if(lp.indexOf('/alliance/info.php') != -1){
$("#gray02Wrapper > table:nth-child(3) > tbody > tr:nth-child(10) > td").html(conv($("#gray02Wrapper > table:nth-child(3) > tbody > tr:nth-child(10) > td").html()));
}
function conv(scr){
if ( null == scr ){ return null; }
//改行削除
scr = scr.replace(/[\n\r]/g, "");
//brタグ -> 改行
scr = scr.replace(/(<br \/>|<br>)/ig, "\n");
//gyazoを処理
var gazo_reg = '/(http(s?):\/\/gyazo.com\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&\=+\$,%#]+)/gi';
scr = scr.replace(gazo_reg, "$1");
scr = scr.replace(gazo_reg,
"<div><a href='$1' target=_blank><img src='$1.png' width=\"200px\" style=\"margin: 2px; border:solid 1px #d3d3d3\" /></a></div>");
//改行 -> brタグ
scr = scr.replace(/[\n\r]/g, "<br />");
return scr;
}
-----+
/* トレード書簡の削除
------------------------------------------------------------------------------*/
function tradeShokanDel(){
var shokan_ids = [];
$(".commonTables tr.unread").each(function(){
var unreadBID = $(this).is(":contains('【即時落札】カードを落札しました')");
if(unreadBID){
var shokan_id = $(this).find("td:first-child input").val();
shokan_ids.push(shokan_id);
}
});
if(shokan_ids.length > 0){
$(shokan_ids).each(function(index,value){
var ssid = getCookie("SSID");
var param = {};
param['ssid'] = ssid;
param['mode'] = 'inbox';
param['p'] = 1;
param['chk[]'] = value;
var pre_param = {};
pre_param['m'] = 'inbox';
pre_param['p'] = 1;
pre_param['id'] = value;
$.ajax({
type: 'get',
url: '/message/detail.php',
dataType: 'html',
data:pre_param
}).then(
function(data){
$.ajax({
type: 'post',
url: '/message/delete.php',
dataType: 'html',
data:param
}).then(
function(data){
alert("削除完了");
},function(data){
}
);
},function(data){
}
);
});
}
}
if(lp.indexOf('/message/inbox.php') != -1){
// Run
$(document).ready(function(){
var inbox_param = {};
var inbox_del_html = (function(param){/*
<ul class="del_inbox_menu">
<li class="unread_btn"><a href="javascript:void(0)">[未読の即落札書簡を削除]</a></li>
</ul>
*/}).toString().replace(/(\n)/g, '').split('*')[1];
var $inbox_append_html = $.tmpl(inbox_del_html,inbox_param) || '';
$inbox_append_html.find(".unread_btn a").off("click").on("click",function(){
$(this).html("削除中(´-ω-`)");
tradeShokanDel();
});
$("#statMenu").after($inbox_append_html);
});
}
---
$(".slides li img").each(function(){
var onclick_txt = $(this).attr("onclick");
var reg_txt = onclick_txt.match(/ga\((.+?)\)/);
var data_obj = reg_txt[1].replace(/\'(.+?)\'/g,'$1').split(",");
console.log(data_obj);
});
------
// 出兵オブジェクト生成関数
function troopObj(param){
this.s = param.s; // server
this.x = param.x;
this.y = param.y;
this.kind = param.kind;
this.name = param.name;
this.arrival_time = param.arrival_time;
}
// オブジェクトに関数を追加する
function checkTimeMethod(obj){
obj.checkTime = function(){
// 現時刻が到着時間を超えていた場合は1を返す
var now_time = new Date().getTime();
var set_time = new Date(this.arrival_time).getTime();
if(set_time <= now_time){
return 1;
}else{
return 0;
}
}
return obj;
}
// オブジェクトの生成サンプル
var param = {};
param.x = 1;
param.y = 1;
param.kind = 1;
param.name = "hoge";
param.arrival_time = "2016-04-11 17:27:00";
var xxx = new troopObj(param)
xxx = checkTimeMethod(xxx);
var json_text = JSON.stringify(xxx);
var obj = JSON.parse(json_text);
obj = checkTimeMethod(obj);
------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment