mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-06-30 22:30:38 +02:00
[refactor] better modal heading string handling
This commit is contained in:
@ -111,7 +111,7 @@ var modal = (function() {
|
|||||||
modalControls.appendChild(actionButton);
|
modalControls.appendChild(actionButton);
|
||||||
if (options.heading != null) {
|
if (options.heading != null) {
|
||||||
if (options.heading.length > _maxHeadingLength) {
|
if (options.heading.length > _maxHeadingLength) {
|
||||||
options.heading = options.heading.substring(0, _maxHeadingLength) + "...";
|
options.heading = options.heading.substring(0, _maxHeadingLength).replace(/\s+$/, "") + "...";
|
||||||
};
|
};
|
||||||
var modalHeading = helper.makeNode({
|
var modalHeading = helper.makeNode({
|
||||||
tag: "h1",
|
tag: "h1",
|
||||||
|
Reference in New Issue
Block a user