Skip to content

Commit

Permalink
html プロパティの指定をしても有効になっていなかった問題を修正
Browse files Browse the repository at this point in the history
比較演算子を厳密比較に変更
  • Loading branch information
RainbowMage committed Dec 6, 2014
1 parent 982cba6 commit be2a4e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion OverlayPlugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.2.1")]
[assembly: AssemblyVersion("0.2.2.2")]
30 changes: 15 additions & 15 deletions OverlayPlugin/resources/miniparse.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@

// テキスト取得
var elementText;
if (typeof encounterDefine == 'function') {
if (typeof encounterDefine === 'function') {
elementText = encounterDefine(data.Encounter);
} else if (typeof encounterDefine == 'string') {
} else if (typeof encounterDefine === 'string') {
elementText = parseActFormat(encounterDefine, data.Encounter);
} else {
console.log("updateEncounter: Could not update the encounter element due to invalid type.");
Expand All @@ -209,20 +209,20 @@
for (var i = 0; i < headerDefine.length; i++) {
var cell = document.createElement("th");
// テキスト設定
if (typeof headerDefine[i].text != 'undefined') {
if (typeof headerDefine[i].text !== 'undefined') {
cell.innerText = headerDefine[i].text;
} else if (typeof headerDefine[i].html != 'undefined') {
cell.innerHTML = headerDefine[i].text;
} else if (typeof headerDefine[i].html !== 'undefined') {
cell.innerHTML = headerDefine[i].html;
}
// 幅設定
cell.style.width = headerDefine[i].width;
cell.style.maxWidth = headerDefine[i].width;
// 横結合数設定
if (typeof(headerDefine[i].span) !== 'undefined') {
if (typeof headerDefine[i].span !== 'undefined') {
cell.colSpan = headerDefine[i].span;
}
// 行揃え設定
if (typeof(headerDefine[i].align) !== 'undefined') {
if (typeof headerDefine[i].align !== 'undefined') {
cell.style["textAlign"] = headerDefine[i].align;
}
headerRow.appendChild(cell);
Expand All @@ -248,32 +248,32 @@
{
var cell = tableRow.insertCell(i);
// テキスト設定
if (typeof bodyDefine[i].text != 'undefined') {
if (typeof bodyDefine[i].text !== 'undefined') {
var cellText;
if (typeof bodyDefine[i].text == 'function') {
if (typeof bodyDefine[i].text === 'function') {
cellText = bodyDefine[i].text(combatant, combatantIndex);
} else {
cellText = parseActFormat(bodyDefine[i].text, combatant);
}
cell.innerText = cellText;
} else if (typeof bodyDefine[i].html != 'undefined') {
} else if (typeof bodyDefine[i].html !== 'undefined') {
var cellHTML;
if (typeof bodyDefine[i].html == 'function') {
if (typeof bodyDefine[i].html === 'function') {
cellHTML = bodyDefine[i].html(combatant, combatantIndex);
} else {
cellHTML = parseActFormat(bodyDefine[i].html, combatant);
}
cell.innerText = cellHTML;
cell.innerHTML = cellHTML;
}
// 幅設定
cell.style.width = bodyDefine[i].width;
cell.style.maxWidth = bodyDefine[i].width;
// 行構え設定
if (typeof(bodyDefine[i].align) !== 'undefined') {
cell.style["textAlign"] = bodyDefine[i].align;
cell.style.textAlign = bodyDefine[i].align;
}
// エフェクト実行
if (typeof bodyDefine[i].effect == 'function') {
if (typeof bodyDefine[i].effect === 'function') {
bodyDefine[i].effect(cell, combatant, combatantIndex);
}
}
Expand Down Expand Up @@ -311,7 +311,7 @@
}
else {
var tag = str.slice(openBraceIndex + 1, closeBraceIndex);
if (dictionary[tag] != void (0)) {
if (typeof dictionary[tag] !== 'undefined') {
result += dictionary[tag];
} else {
console.log("parseActFormat: Unknown tag: " + tag);
Expand Down

0 comments on commit be2a4e7

Please sign in to comment.