@xpadev-net/niconicomments 0.2.5 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +3 -3
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
niconicomments.js v0.2.
|
|
2
|
+
niconicomments.js v0.2.8
|
|
3
3
|
(c) 2021 xpadev-net https://xpadev.net
|
|
4
4
|
Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -157,6 +157,7 @@
|
|
|
157
157
|
NiconiComments.prototype.getFont = function (parsedData) {
|
|
158
158
|
var result = [];
|
|
159
159
|
for (var i in parsedData) {
|
|
160
|
+
parsedData[i].content = parsedData[i].content.replace(/\t/g, "\u2003\u2003");
|
|
160
161
|
result[i] = this.parseCommandAndNicoscript(parsedData[i]);
|
|
161
162
|
}
|
|
162
163
|
return result;
|
|
@@ -394,7 +395,7 @@
|
|
|
394
395
|
height = (comment.fontSize * (1 + this.commentYPaddingTop) * lines.length) + (this.commentYMarginBottom * comment.fontSize);
|
|
395
396
|
if (comment.loc !== "naka" && !comment.tateresized) {
|
|
396
397
|
if (comment.full && width_max > 1920) {
|
|
397
|
-
comment.fontSize -=
|
|
398
|
+
comment.fontSize -= 2;
|
|
398
399
|
comment.resized = true;
|
|
399
400
|
comment.yokoResized = true;
|
|
400
401
|
this.context.font = parseFont(comment.font, comment.fontSize, this.useLegacy);
|
|
@@ -655,7 +656,6 @@
|
|
|
655
656
|
return { loc: loc, size: size, fontSize: fontSize, color: color, font: font, full: full, ender: ender, _live: _live, invisible: invisible, long: long };
|
|
656
657
|
};
|
|
657
658
|
NiconiComments.prototype.parseCommandAndNicoscript = function (comment) {
|
|
658
|
-
comment.content = comment.content.replace("/\t/g", " ");
|
|
659
659
|
var data = this.parseCommand(comment), nicoscript = comment.content.match(/^@(デフォルト|置換|逆|コメント禁止|シーク禁止|ジャンプ)/);
|
|
660
660
|
if (nicoscript) {
|
|
661
661
|
switch (nicoscript[1]) {
|
package/package.json
CHANGED