Skip to content

CommentGenerator_multi.htmlの書き換え方

ryu-s edited this page Dec 28, 2020 · 3 revisions

HTML5コメントジェネレーターのCommentGenerator_multi.htmlをMultiCommentViewer仕様に修正する方法です。

CommentGenerator_multi.htmlの121行目辺りの次のような部分を

if(xml[i].getAttributeNode("service").value == "nicolive") {
  handle = "【ニコ生】" + handle;
} else if(xml[i].getAttributeNode("service").value == "youtubelive") {
  handle = "【YouTube】" + handle;
} else if(xml[i].getAttributeNode("service").value == "twitch") {
  handle = "【twitch】" + handle;
} else if(xml[i].getAttributeNode("service").value == "FRESH") {
  handle = "【FRESH!】" + handle;
} else if(xml[i].getAttributeNode("service").value == "AbemaFresh") {
  handle = "【FRESH!】" + handle;
} else if(xml[i].getAttributeNode("service").value == "OPENREC") {
  handle = "【OPENREC】" + handle;
} else if(xml[i].getAttributeNode("service").value == "Mixer") {
  handle = "【Mixer】" + handle;
}

下記のように書き換えてください。

if(xml[i].getAttributeNode("service").value == "youtubelive") {
  handle = "【YouTube】" + handle;
} else if(xml[i].getAttributeNode("service").value == "nicolive") {
  handle = "【ニコ生】" + handle;
} else if(xml[i].getAttributeNode("service").value == "twitch") {
  handle = "【Twitch】" + handle;
} else if(xml[i].getAttributeNode("service").value == "twicas") {
  handle = "【Twicas】" + handle;
} else if(xml[i].getAttributeNode("service").value == "whowatch") {
  handle = "【ふわっち】" + handle;
} else if(xml[i].getAttributeNode("service").value == "openrec") {
  handle = "【OPENREC】" + handle;
} else if(xml[i].getAttributeNode("service").value == "mirrativ") {
  handle = "【Mirrativ】" + handle;
} else if(xml[i].getAttributeNode("service").value == "linelive") {
  handle = "【LINELIVE】" + handle;
} else if(xml[i].getAttributeNode("service").value == "periscope") {
  handle = "【Periscope】" + handle;
} else if(xml[i].getAttributeNode("service").value == "mixer") {
  handle = "【Mixer】" + handle;
} else if(xml[i].getAttributeNode("service").value == "mildom") {
  handle = "【Mildom】" + handle;
} else if(xml[i].getAttributeNode("service").value == "showroom") {
  handle = "【SHOWROOM】" + handle;
} else if(xml[i].getAttributeNode("service").value == "bigo") {
  handle = "【BIGO】" + handle;
}