"
+ mDeckFrame.snapshotItem(0).innerHTML
}
}
function gMapXY(tmpxy) {
var xy = new Array();
tmpxy += "map";
var txxyy = tmpxy.match(/[-|-|ー]?[\d+|[0-9]+]?[\,|、|,|\.|.]?[-|-|ー]?[\d+|[0-9]+/g);
//console.log("txxyy = " + txxyy);
if (txxyy!=null){
tmpxxyy = txxyy[0].replace(/[,|,|、|\.|.]/g,",");
tmpxxyy = tmpxxyy.replace(/[(|)|(|)]/g,"");
//console.log("tmpxxyy = " + tmpxxyy);
if (tmpxxyy.indexOf(",") != -1 ) {
var xxyy = tmpxxyy.substring(0,tmpxxyy.length).split(",");
xy[0] = isHan(xxyy[0]);
xy[1] = isHan(xxyy[1]);
}
}
//console.log(xy[0] + "," + xy[1]);
if (isNaN(xy[0]) || isNaN(xy[1]) || txxyy==null){
xy[0] = "";
xy[1] = "";
}
return xy;
}
function setLink1(aTitle,aHref){
//var linkLi = document.createElement("li");
//var linkLi = document.createElement("li");
var linkA = document.createElement("a");
linkA.href = aHref;
linkA.style.textDecoration = "none";
linkA.innerHTML = '
' + aTitle + '';
//linkLi.appendChild(linkA);
//return linkLi;
return linkA;
}
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName("head")[0];
if (!head) { return; } style = document.createElement("style");
style.type = "text/css";
style.innerHTML = css;
head.appendChild(style);
}
function initPopup() {
//CSS
addGlobalStyle(
".popup{"+
"position:absolute; left:0px; top:0px; visibility:hidden; "+
"font-size:9pt; color:#0000FF; "+
"background-color:#FFFFFF; layer-background-color:#FFFFFF; "+
"border:2px solid #000000; padding:15; z-index:9999999;"+
"}"
);
//表示関数
var funcHTML =
'function onPopup(text, nX, nY) {\n'+
'var sX = 10, sY = 20;\n'+
'var msgElem = document.getElementById("popup");\n'+
'msgElem.innerHTML = text;\n'+
'msgElem.style.visibility = "visible";\n'+
'msgElem.style.left = (nX + sX) + "px";\n'+
'msgElem.style.top = (nY + sY) + "px";\n'+
'}\n'+
'function offPopup() {\n'+
'document.getElementById("popup").style.visibility = "hidden";\n'+
'}\n';
var scriptElem = document.createElement("script");
scriptElem.type = "text/javascript";
scriptElem.innerHTML = funcHTML;
document.getElementsByTagName("head")[0].appendChild(scriptElem);
//HTMLタグ追加
var popupElem = document.createElement('span');
popupElem.id = "popup";
popupElem.className = "popup";
var mapElem = document.evaluate('//*[@id="gray02Wrapper"]',
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
if(mapElem.snapshotItem(0)==null){
var mapElem = document.evaluate('//*[@id="whiteWrapper"]',
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
}
mapElem.snapshotItem(0).appendChild(popupElem);
//イベントリスナー登録
popupElem.addEventListener("mouseover",
function() { this.style.visibility = "hidden" }, true);
}
function setSolCnt(IX,cnt,sw) {
if (GM_getValue(location.hostname + swNo[IX], sw)) {
//console.log(swNo[IX] + "=" + sw);
var strIn = document.evaluate(
'//*[@id="' + solName[IX] + '"]', document, null, 7, null);
if(strIn.snapshotItem(0)!=null){
strIn.snapshotItem(0).value = cnt;
}
}
}
function addMainHtml() {
var MOUSE_DRAGGING = false;
var MOUSE_OFFSET_X;
var MOUSE_OFFSET_Y;
var popupLeft = GM_getValue(location.hostname + "_Main_left", 800);
var popupTop = GM_getValue(location.hostname + "_Main_top", 149);
if (popupLeft < 0) popupLeft = 800;
if (popupTop < 0) popupTop = 149;
// popupLeft = 643;
// popupTop = 143;
var bmContainer = document.createElement("div");
bmContainer.id = "main1Container";
bmContainer.style.cssText = "-moz-border-radius: 8px";
bmContainer.style.position = "absolute";
bmContainer.style.color = "#FFFFFF";
bmContainer.style.backgroundColor = "#333333";
//bmContainer.style.border = "outset 2px #333333";
bmContainer.style.left = popupLeft + "px";
bmContainer.style.top = popupTop + "px";
bmContainer.style.fontSize = "10px";
bmContainer.style.padding = "5px";
bmContainer.style.zIndex = 10;
bmContainer.style.textAlign = "left";
//border-radius: 20px;
// menuContainer.style.opacity = 0.8;
document.body.appendChild(bmContainer);
//
var bmURL0 = document.createElement("table");
bmURL0.id = "mainURL0";
var bmTD1 = document.createElement("td");
bmTD1.id = "mainTD1";
bmTD1.style.fontSize = "14px";
bmTD1.style.margin = "0px";
var linkBox = document.createElement("div");
linkBox.setAttribute( 'class', 'sideBox' );
var linkBoxHead = document.createElement("div");
linkBoxHead.setAttribute( 'class', 'sideBoxHead' );
linkBoxHead.setAttribute( 'id', 'sideBoxHeadID0' );
var linkBoxH3 = document.createElement("H3");
linkBoxH3.innerHTML =
"
"
+ " id=\"sbx1\" >"
+ "" + " Menu " + txtVer + "
";
bmTD1.appendChild(linkBoxH3);
bmURL0.appendChild(bmTD1);
var bmTD2 = document.createElement("td");
bmTD2.id = "mainTD2";
//bmTD2.style.align = "right";
//bmTD2.style.WIDTH = "50";
bmTD2.align = "right";
bmTD2.width = "36";
var hide = document.createElement('img');
hide.type='button';
//hide.setAttribute('style','WIDTH: 18px; HEIGHT: 18px');
//hide.value = 'Х';
hide.src = imgCloseUp;//imgCloseDown;
hide.href = "javascript:void(0);";
hide.addEventListener("mousedown", function() {hide.src=imgCloseDown;}, true);
hide.addEventListener("click", function() {closeMenu3()}, true);
bmTD2.appendChild(hide);
bmURL0.appendChild(bmTD2);
bmContainer.appendChild(bmURL0);
var bm3 = document.createElement("div");
bm3.id = "bmURL3";
bm3.style.fontSize = "12px";
bm3.style.margin = "3px";
var linkMAPxy = document.createElement("div");
linkMAPxy.setAttribute( 'class', 'sideBoxInner basename' );
var inTbl = document.createElement("table");
var inTd1 = document.createElement("td");
var inXY = document.createElement("input");
inXY.setAttribute( 'id', 'getXY' );
inXY.setAttribute( 'name', 'ingetXY' );
inXY.setAttribute( 'type', 'text' );
//inXY.setAttribute( 'size', '20' );
inXY.setAttribute( 'style',"width:75px; height:18px;" );
inXY.setAttribute( 'title', '入力例 123,456 or (123,456)' );
var inTd2 = document.createElement("td");
inTd2.innerHTML = " ";
var inTd3 = document.createElement("td");
var goXY1 = document.createElement("input");
goXY1.setAttribute( 'type', 'button' );
goXY1.setAttribute( 'value', '同' );
goXY1.setAttribute( 'id', 'goMap1' );
goXY1.setAttribute( 'name', 'goMap1' );
var inTd4 = document.createElement("td");
var goXY2 = document.createElement("input");
goXY2.setAttribute( 'type', 'button' );
goXY2.setAttribute( 'value', '別' );
goXY2.setAttribute( 'id', 'goMap2' );
goXY2.setAttribute( 'name', 'goMap2' );
var calcTP1 = document.createElement("input");
calcTP1.setAttribute( 'type', 'button' );
calcTP1.setAttribute( 'value', '手数料計算' );
calcTP1.setAttribute( 'id', 'calcTP1' );
calcTP1.setAttribute( 'name', 'calcTP1' );
calcTP1.setAttribute( 'style',"width:80px; height:18px;" );
inTd1.appendChild(inXY);
inTd3.appendChild(goXY1);
inTd4.appendChild(goXY2);
inTbl.appendChild(inTd1);
inTbl.appendChild(inTd2);
inTbl.appendChild(inTd3);
inTbl.appendChild(inTd4);
linkMAPxy.appendChild(inTbl);
linkMAPxy.appendChild(calcTP1);
var linkUl = document.createElement("ul");
linkUl.appendChild(setLink1("■同盟ログ" ,"../alliance/alliance_log.php" ));
linkUl.appendChild(setLink1("■同盟掲示板" ,"../bbs/topic_view.php" ));
linkUl.appendChild(setLink1("■内政設定" ,"../card/domestic_setting.php" ));
linkUl.appendChild(setLink1("■合成" ,"../union/index.php" ));
linkUl.appendChild(setLink1("■トレード" ,"../card/trade.php" ));
linkMAPxy.appendChild(linkUl);
linkBox.appendChild(linkBoxHead);
linkBox.appendChild(linkMAPxy);
//mSide.snapshotItem(0).appendChild(linkBox);
bmContainer.appendChild(linkBox);
//addOpenLinkHtml();
document.getElementById('goMap1').addEventListener("click",
function() {
var xy = gMapXY(document.getElementById("getXY").value);
location.href = "/map.php?x=" + xy[0] + "&y=" + xy[1];
//window.open( "/map.php?x=" + xy[0] + "&y=" + xy[1],"_blank");
document.getElementById("getXY").value = "";
},
true);
document.getElementById('goMap2').addEventListener("click",
function() {
var xy = gMapXY(document.getElementById("getXY").value);
//location.href = "/map.php?x=" + xx + "&y=" + yy;
window.open( "/map.php?x=" + xy[0] + "&y=" + xy[1],"_blank");
document.getElementById("getXY").value = "";
},
true);
document.getElementById('calcTP1').addEventListener("click",
function() {
var inTP1 = document.getElementById("getXY").value;
var tmpTP1 = Math.floor( inTP1 );
if ( isNaN(tmpTP1) ) {
tmpTP1 = 0
}
var tmpTP2 = Math.floor(tmpTP1*0.1);
if ( tmpTP1 > 500 ) {
tmpTP2 += Math.floor((tmpTP1 - 500) * 0.1);
}
if ( tmpTP1 > 1000 ) {
tmpTP2 += Math.floor((tmpTP1 - 1000) * 0.1);
}
if( tmpTP1 == 0){
alert("落札希望額を入力してください");
} else {
alert(
"落札額:" + tmpTP1 + "\n" +
"手数料:" + tmpTP2 + "\n" +
"受領額:" + ( tmpTP1 - tmpTP2 ) + "\n")
document.getElementById("getXY").value = "";
}
},
true);
//addOpenLinkHtml2();
//openMenu();
if ( GM_getValue(location.hostname + swNo[8], true)) {
//addBMHtml(mStatus.snapshotItem(0).innerHTML);
addBMHtml(bmContainer.innerHTML);
}
//ドラッグ&ドロップ設定
bmContainer.addEventListener("dblclick",
function(event) {
MOUSE_DRAGGING = true;
MOUSE_OFFSET_X = event.pageX - parseInt(this.style.left);
MOUSE_OFFSET_Y = event.pageY - parseInt(this.style.top);
event.preventDefault();
//console.log("mousedown");
},
false);
document.body.addEventListener("mousemove",
function(event) {
if (!MOUSE_DRAGGING) return true;
var bmContainer = document.getElementById("main1Container");
// console.log("mousemove " + bmContainer.style.top);
if (bmContainer == undefined) return true;
var popupLeft = event.pageX - MOUSE_OFFSET_X;
var popupTop = event.pageY - MOUSE_OFFSET_Y;
bmContainer.style.left = popupLeft + "px";
bmContainer.style.top = popupTop + "px";
//ポップアップ位置を永続保存
GM_setValue(location.hostname + "_Main_left", popupLeft);
GM_setValue(location.hostname + "_Main_top", popupTop);
//console.log(" x = " + popupLeft ," , y = " + popupTop);
},
false);
bmContainer.addEventListener("mouseup",
function(event) {
MOUSE_DRAGGING = false;
//console.log("mouseup");
},
false);
//bmContainer.appendChild(bm3);
}
function addBMHtml(tAdd) {
var MOUSE_DRAGGING = false;
var MOUSE_OFFSET_X;
var MOUSE_OFFSET_Y;
var popupLeft = GM_getValue(location.hostname + "_BM_left", 743);
var popupTop = GM_getValue(location.hostname + "_BM_top", 143);
if (popupLeft < 0) popupLeft = 743;
if (popupTop < 0) popupTop = 143;
// popupLeft = 643;
// popupTop = 143;
var bmContainer = document.createElement("div");
bmContainer.id = "bmContainer";
bmContainer.style.cssText = "-moz-border-radius: 8px";
bmContainer.style.position = "absolute";
bmContainer.style.color = "#FFFFFF";
bmContainer.style.backgroundColor = "#333333";
bmContainer.style.border = "outset 2px #333333";
bmContainer.style.left = popupLeft + "px";
bmContainer.style.top = popupTop + "px";
bmContainer.style.fontSize = "10px";
bmContainer.style.padding = "2px";
bmContainer.style.zIndex = 10;
bmContainer.style.textAlign = "left";
// menuContainer.style.opacity = 0.8;
document.body.appendChild(bmContainer);
//ドラッグ&ドロップ設定
bmContainer.addEventListener("dblclick",
function(event) {
MOUSE_DRAGGING = true;
MOUSE_OFFSET_X = event.pageX - parseInt(this.style.left);
MOUSE_OFFSET_Y = event.pageY - parseInt(this.style.top);
event.preventDefault();
//console.log("mousedown");
},
false);
document.body.addEventListener("mousemove",
function(event) {
if (!MOUSE_DRAGGING) return true;
var bmContainer = document.getElementById("bmContainer");
if (bmContainer == undefined) return true;
var popupLeft = event.pageX - MOUSE_OFFSET_X;
var popupTop = event.pageY - MOUSE_OFFSET_Y;
bmContainer.style.left = popupLeft + "px";
bmContainer.style.top = popupTop + "px";
//console.log("*** (" + popupLeft + "," + popupTop + ") = " + bmContainer.style.backgroundColor);
//ポップアップ位置を永続保存
GM_setValue(location.hostname + "_BM_left", popupLeft);
GM_setValue(location.hostname + "_BM_top", popupTop);
//console.log(" x = " + popupLeft ," , y = " + popupTop);
},
false);
document.body.addEventListener("mouseup",
function(event) {
MOUSE_DRAGGING = false;
},
false);
//
var bmURL0 = document.createElement("table");
bmURL0.id = "bmURL0";
var bmTR1 = document.createElement("tr");
var bmTD1 = document.createElement("td");
bmTD1.id = "bmTD1";
bmTD1.style.fontSize = "14px";
bmTD1.style.margin = "0px";
var tmpLen = 0;
var tmpCnt = parseInt(GM_getValue(location.hostname + "_bm_cnt", 10)) + 1;
for(var i=1;i
tmpLen) {
tmpLen = sStr;
}
}
var sStr = " ";
for(var i=1;i'
+ ''
+ ''
+ ' お気に入り' + sStr
+ '
'
+ ' ';
bmTR1.appendChild(bmTD1);
var bmTD2 = document.createElement("td");
bmTD2.id = "bmTD2";
bmTD2.style.align = "right";
var hide = document.createElement('img');
hide.type='button';
//hide.setAttribute('style','WIDTH: 18px; HEIGHT: 18px');
//hide.value = 'Х';
hide.src = imgCloseUp;//imgCloseDown;
hide.href = "javascript:void(0);";
hide.addEventListener("mousedown", function() {hide.src=imgCloseDown;}, true);
hide.addEventListener("click", function() {closeMenu2()}, true);
bmTD2.appendChild(hide);
bmTR1.appendChild(bmTD2);
bmURL0.appendChild(bmTR1);
bmContainer.appendChild(bmURL0);
var bmTR2 = document.createElement("tr");
var bm3 = document.createElement("div");
bm3.id = "bmURL3";
bm3.style.fontSize = "8px";
bm3.style.margin = "3px";
//bm3.innerHTML = ''
// + '';
var tmpCnt = parseInt(GM_getValue(location.hostname + "_bm_cnt", 10)) + 1;
var mData2 = GM_getValue(location.hostname + "_myData_vid" ,"").split("\n");
//console.log(mData);
var mArray2 = new Array();
if (mData2 != "" ) {
var divList = document.createElement("div");
divList.id = "bmsetList";
var ulList = document.createElement("ul");
//console.log(getParameters2("" + mData2[1] + "","village_id","?","\""));
for(var i=1;i
" + mData2[i].replace(/\(本拠地\)/g,"") + "";
var tmpS1 = document.createElement("span");
tmpS1.innerHTML = mData2[i].replace(/\(本拠地\)/g,"") ;
var tID =getParameters2("" + mData2[i] + "","village_id","?","\"");
//console.log("village_id=" + tID + "&from=menu&page=" + location.pathname);
var sX = getMyID(tID).split(",")[0];
var sY = getMyID(tID).split(",")[1];
liList.innerHTML = '' + '' + tmpS1.textContent + '' + ''
+ ' '
+ '' + ''
+ ''
+ '' + ''
+ ''
+ '' + ''
;
if( getMyID(tID)==getMyXY()){
//bm3.innerHTML += "" + mData2[i].replace(/\(本拠地\)/g,"") + "";
//console.log("okok");
liList.setAttribute( 'class', 'on' );
liList.setAttribute( 'id', 'setListOn' );
//var tmpS1 = document.createElement("span");
//tmpS1.innerHTML = mData2[i].replace(/\(本拠地\)/g,"") ;
//liList.innerHTML = "" + "" + mData2[i].replace(/\(本拠地\)/g,"") + "" + "";
/* $("#setListOn" )
.css({
*/
liList.innerHTML = "' ;
}
if(tmpS1.textContent!="") ulList.appendChild(liList);
}
}
liList.innerHTML = "
" ;
// console.log(liList.innerHTML);
ulList.appendChild(liList);
divList.appendChild(ulList);
bm3.appendChild(divList);
bmTR2.appendChild(bm3);
bmContainer.appendChild(bmTR2);
}
var divList = document.createElement("div");
var ulList = document.createElement("ul");
for(var i=1;i'
+ '' + sStr + ''
+ ' '
// + '(地)' + ''
// + '';
+ '' + ''
+ ''
+ '' + ''
;
ulList.appendChild(liList);
}
}
divList.appendChild(ulList);
bm3.appendChild(divList);
bmTR2.appendChild(bm3);
bmContainer.appendChild(bmTR2);
}
//自拠点座標取得
function getMyXY() {
// /html/body/div/div[2]/div/ul/li[2]/a
var elems = document.evaluate('//*[@class="gnavi02"]/a',
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
//console.log(elems.snapshotItem(0).href);
//console.log(getParameters(elems.snapshotItem(0).href,"x") + "," +
// getParameters(elems.snapshotItem(0).href,"y"));
return (getParameters(elems.snapshotItem(0).href,"x") + "," +
getParameters(elems.snapshotItem(0).href,"y"));
}
function getMyID(VillageID) {
var str0 = GM_getValue(location.hostname + "VillageXY2(" + VillageID + ")","");
//var strX = getParameters("dmy?" + str0,"x");
//var strY = getParameters("dmy?" + str0,"y");
//if (VillageID!=""){
// console.log(VillageID + " = " + str0 );
//}
return str0;
}
function getByteStr(str){
var bc=0;
for(var i=0;i 0 && reIx < tmpCnt){
var defStr;
var tmpStr = GM_getValue(location.hostname + "LastAttack" + reIx, "");
if ( tmpStr != "" ) {
defStr = tmpStr;
} else {
defStr = "(" + tmpGetX + "," + tmpGetY + ")☆";
}
var reTry = window.prompt("出兵先の名前を登録してください。\n※空欄で削除になります。",defStr);
// console.log(reTry);
if (reTry != null) {
var tCom = reIx + " : 「" + reTry + "」 (" + tmpGetX + "," + tmpGetY + ") 登録しますか?"
if (reTry == "" ) {
tCom = "「" + defStr + "」を削除しますか?"
}
if (window.confirm(tCom,true)){
GM_setValue(location.hostname + "LastAttack" + reIx, reTry);
GM_setValue(location.hostname + "LastAttackX" + reIx, tmpGetX);
GM_setValue(location.hostname + "LastAttackY" + reIx, tmpGetY);
//document.body.reload;
location.reload();
}
}
}
}
//sidebox
function AddTagSideBox(tmpHtml) {
return "" + tmpHtml + "
";
}
function getChildElement(parentNode, position) {
var current = 0;
for (var i = 0; i < parentNode.childNodes.length; i++){
var childNode = parentNode.childNodes[i];
if (childNode.nodeType == 1) {
if (current == position) {
return childNode;
}
current++;
}
}
return undefined;
}
function getElementsByClass(searchClass) {
var classElements = new Array();
var allElements = document.getElementsByTagName("*");
for (i = 0, j = 0; i < allElements.length; i++) {
if (allElements[i].className == searchClass) {
classElements[j] = allElements[i];
j++;
}
}
return classElements;
}
//パラメータ取得
function getParameter(str,key) {
//console.log("function str = " + str);
str = str.search.split('?');
if (str.length < 2) {
return "";
}
var params = str[1].split("&");
for (var i = 0; i < params.length; i++) {
var keyVal = params[i].split("=");
if (keyVal[0] == key && keyVal.length == 2) {
return decodeURIComponent(keyVal[1]);
}
}
return "";
}
function getParameters(str,key) {
var str2 = str.split('?');
if (str2.length < 2) {
return "";
}
var params = str2[1].split("&");
for (var i = 0; i < params.length; i++) {
var keyVal = params[i].split("=");
if (keyVal[0] == key && keyVal.length == 2) {
return decodeURIComponent(keyVal[1]);
}
}
return "";
}
function getParameters2(str,key,delim1,delim2) {
//console.log(str);
var str2 = str.split(delim1);
if (str2.length < 2) {
return "";
}
var params = str2[1].split(delim2);
for (var i = 0; i < params.length; i++) {
var keyVal = params[i].split("=");
if (keyVal[0] == key && keyVal.length == 2) {
return decodeURIComponent(keyVal[1]);
}
}
return "";
}
function trim(str) {
return str.replace(/^[ \t\r\n]+|[ \t\r\n]+$/g, "");
}
//数値チェック
function isNumeric(num) {
if (num.match(/^-?[0-9]+$/)) {
return true;
}
return false;
}
function isHan(str0) {
var str = new String(str0);
str = str.replace(/ー/g,"-");
str = str.replace(/-/g,"-");
str = str.replace(/0/g,"0");
str = str.replace(/1/g,"1");
str = str.replace(/2/g,"2");
str = str.replace(/3/g,"3");
str = str.replace(/4/g,"4");
str = str.replace(/5/g,"5");
str = str.replace(/6/g,"6");
str = str.replace(/7/g,"7");
str = str.replace(/8/g,"8");
str = str.replace(/9/g,"9");
str = str.replace(/:/g,":");
str = str.replace(///g,"/");
return str;
}
function matchString(target, sub) {
if (target == undefined || sub == undefined) {
return false;
}
target = new String(target);
sub = new String(sub);
//console.log(target + " ==? " + sub);
if (sub != "") {
if (target == sub) {
//console.log(target + " == " + sub);
return true;
}
}
return false;
}
//リンクHTML追加
function addOpenLinkHtml() {
var container;
var sidebar = document.evaluate('/html/body/div/div[3]/div[2]/div[2]/div[2]/div/div[2]/ul/font/li[5]',
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
if (sidebar.snapshotLength == 0) {
container = document.body;
} else {
container = sidebar.snapshotItem(0);
}
/*
var menuLink = document.createElement("span");
menuLink.id = "menuLink";
menuLink.innerHTML = '
';
var menuLink1 = document.createElement("button");
menuLink1.id = "menuLink1";
menuLink1.href = "javascript:void(0);";
menuLink1.innerHTML =
'お気に入り
';
menuLink1.addEventListener("click", function() {openMenu2()}, true);
menuLink.appendChild(menuLink1);
var menuLink2 = document.createElement("button");
menuLink2.id = "menuLink2";
menuLink2.href = "javascript:void(0);";
menuLink2.innerHTML =
'設定
';
menuLink2.addEventListener("click", function() {openMenu()}, true);
menuLink.appendChild(menuLink2);
container.appendChild(menuLink);
*/
}
//
function addMenuHtml() {
var MOUSE_DRAGGING = false;
var MOUSE_OFFSET_X;
var MOUSE_OFFSET_Y;
//var deckWdth = GM_getValue(location.hostname + "_deck_Width", 793);
popupLeft = 583;
popupTop = 143;
var menuContainer = document.createElement("div");
menuContainer.id = "menuContainer";
menuContainer.style.cssText = "-moz-border-radius: 8px";
menuContainer.style.position = "absolute";
menuContainer.style.color = "#FFFFFF";
menuContainer.style.backgroundColor = "#333333";
menuContainer.style.border = "outset 2px #333333";
menuContainer.style.left = popupLeft + "px";
menuContainer.style.top = popupTop + "px";
menuContainer.style.fontSize = "12px";
menuContainer.style.padding = "2px";
menuContainer.style.zIndex = 99999;
menuContainer.style.textAlign = "left";
// menuContainer.style.opacity = 0.8;
document.body.appendChild(menuContainer);
var bmURL0 = document.createElement("table");
bmURL0.id = "bmURL0";
var bmTD1 = document.createElement("td");
bmTD1.id = "bmTD1";
bmTD1.style.fontSize = "16px";
bmTD1.style.margin = "0px";
bmTD1.innerHTML = ''
+ ''
+ '
'
+ ''
+ ' 設定 '
+ '
'
+ '
';
bmURL0.appendChild(bmTD1);
var bmTD2 = document.createElement("td");
bmTD2.id = "bmTD2";
bmTD2.style.align = "right";
var hide = document.createElement('img');
hide.type='button';
//hide.setAttribute('style','WIDTH: 18px; HEIGHT: 18px');
//hide.value = '×';
hide.src = imgCloseUp;//imgCloseDown;
hide.href = "javascript:void(0);";
hide.addEventListener("mousedown", function() {hide.src=imgCloseDown;}, true);
hide.addEventListener("click", function() {closeMenu()}, true);
bmTD2.appendChild(hide);
bmURL0.appendChild(bmTD2);
menuContainer.appendChild(bmURL0);
var swIdx;
var dispSw;
swIdx = 1;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," 掲示板逆順表示 ",swNo[swIdx],dispSw));
//menuContainer.appendChild(setSub2(swIdx,dispSw));
swIdx = 2;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," マップリンク ",swNo[swIdx],dispSw));
//menuContainer.appendChild(setSub2(swIdx,dispSw));
swIdx = 3;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," デッキ拠点連動",swNo[swIdx],dispSw));
//menuContainer.appendChild(setSub2(swIdx,dispSw));
swIdx = 4;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," デッキフレーム",swNo[swIdx],dispSw));
//menuContainer.appendChild(setSub2(swIdx,dispSw));
swIdx = 6;
dispSw = GM_getValue(location.hostname + swNo[swIdx], false);
menuContainer.appendChild(setSub1(swIdx," ブショーダス拡張1
※確認無しで引く、
破棄してから引くボタン消去",swNo[swIdx],dispSw));
//menuContainer.appendChild(setSub2(swIdx,dispSw));
swIdx = 7;
dispSw = GM_getValue(location.hostname + swNo[swIdx], false);
menuContainer.appendChild(setSub1(swIdx," ブショーダス拡張2
※拡張1がオンの時に結果を別窓表示",swNo[swIdx],dispSw));
//menuContainer.appendChild(setSub2(swIdx,dispSw));
swIdx = 5;
dispSw = GM_getValue(location.hostname + swNo[swIdx], false);
menuContainer.appendChild(setSub1(swIdx," デッキオフセット
※フレーム化時にずれる方",swNo[swIdx],dispSw));
//menuContainer.appendChild(setSub2(swIdx,dispSw));
var Filler = document.createElement("span");
// Filler.style.fontSize = "10px";
Filler.style.margin = "0px";
Filler.innerHTML = ''
+ ''
+ ' デッキフレームの長さ
※デフォルト 680 ' ;
// + '';
menuContainer.appendChild(Filler);
var deckHeight = document.createElement("input");
deckHeight.type = "text";
deckHeight.size = 5;
deckHeight.value = GM_getValue(location.hostname + "_deck_height", "680");
deckHeight.id = "deckHeight";
deckHeight.innerHTML = "
";
deckHeight.addEventListener("change", function() {
if (deckHeight.value <= 300) {
//deckHeight.value = "600";
}
//console.log(deckHeight.value);
GM_setValue(location.hostname + "_deck_height", deckHeight.value);
}, true);
menuContainer.appendChild(deckHeight);
var Filler = document.createElement("span");
Filler.style.fontSize = "10px";
Filler.style.margin = "0px";
Filler.innerHTML = ''
// + '
'
+ '
';
// + '
';
menuContainer.appendChild(Filler);
swIdx = 8;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," お気に入りを常に表示",swNo[swIdx],dispSw));
swIdx = 70;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," ヨロズダス即引き",swNo[swIdx],dispSw));
swIdx = 11;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," 剣兵セット",swNo[swIdx],dispSw));
swIdx = 12;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," 槍兵セット",swNo[swIdx],dispSw));
swIdx = 13;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," 弓兵セット",swNo[swIdx],dispSw));
swIdx = 14;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," 騎兵セット",swNo[swIdx],dispSw));
swIdx = 21;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," 矛槍兵セット",swNo[swIdx],dispSw));
swIdx = 22;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," 弩兵セット",swNo[swIdx],dispSw));
swIdx = 23;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," 近衛騎兵セット",swNo[swIdx],dispSw));
swIdx = 31;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," 斥候セット",swNo[swIdx],dispSw));
swIdx = 32;
dispSw = GM_getValue(location.hostname + swNo[swIdx], true);
menuContainer.appendChild(setSub1(swIdx," 斥候騎兵セット",swNo[swIdx],dispSw));
swIdx = 33;
dispSw = GM_getValue(location.hostname + swNo[swIdx], false);
menuContainer.appendChild(setSub1(swIdx," 衝車セット ※デフォルトOFF",swNo[swIdx],dispSw));
swIdx = 34;
dispSw = GM_getValue(location.hostname + swNo[swIdx], false);
menuContainer.appendChild(setSub1(swIdx," 投石機セット ※デフォルトOFF",swNo[swIdx],dispSw));
var Filler = document.createElement("span");
// Filler.style.fontSize = "10px";
Filler.style.margin = "0px";
Filler.innerHTML = ''
+ ''
+ ' 到達時間確認
※デフォルト 3 時間 ' ;
// + '
';
menuContainer.appendChild(Filler);
var cTime = document.createElement("input");
cTime.type = "text";
cTime.size = 3;
cTime.value = GM_getValue(location.hostname + swNo[9], "3");
cTime.id = "cTime";
cTime.innerHTML = "