Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ sub tagConvert {
1 while $comm =~ s#&lt;left&gt;(.*?)&lt;/left&gt;\n?#<div class="left">$1</div>#gis;
1 while $comm =~ s#&lt;center&gt;(.*?)&lt;/center&gt;\n?#<div class="center">$1</div>#gis;
1 while $comm =~ s#&lt;right&gt;(.*?)&lt;/right&gt;\n?#<div class="right">$1</div>#gis;
1 while $comm =~ s#&lt;add-line-spacing&gt;(.*?)&lt;/add-line-spacing&gt;\n?#<div class="add-line-spacing">$1</div>#gis;

1 while $comm =~ s#&lt;h([1-6])&gt;(.*?)&lt;/h\1&gt;\n?#<h$1>$2</h$1>#gis;

Expand Down
2 changes: 2 additions & 0 deletions lib/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ button, .button {
.left { text-align: left; }
.center{ text-align: center; }
.right { text-align: right; }
.add-line-spacing { line-height: 2.1; }
.add-line-spacing ruby { line-height: 2.4; }

img.icon { width: 1em; height: 1em; }

Expand Down
1 change: 1 addition & 0 deletions lib/css/chat-common.css
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@ body.rom .input-form { display: none !important; }
.decoration-buttons .insert-left::before { content:"\e236"; }
.decoration-buttons .insert-center::before { content:"\e234"; }
.decoration-buttons .insert-right::before { content:"\e237"; }
.decoration-buttons .insert-add-line-spacing::before { content:"\ea16"; }
.decoration-buttons .insert-headline::before{ content:"\f019"; transform: scale(1.55); }

.decoration-buttons .insert-image::before { content:"\e3f4"; color:#8fd; }
Expand Down
2 changes: 2 additions & 0 deletions lib/html/room.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ <h1><TMPL_VAR title></h1>
<span data-target="form-comm-main" class="button insert-left" title="左揃え"></span>
<span data-target="form-comm-main" class="button insert-center" title="中央揃え"></span>
<span data-target="form-comm-main" class="button insert-right" title="右揃え"></span>
<span data-target="form-comm-main" class="button insert-add-line-spacing" title="行送りを大きく"></span>

<span class="button end insert-headline" title="見出し">
<select data-target="form-comm-main">
Expand Down Expand Up @@ -265,6 +266,7 @@ <h2>発言編集</h2>
<span data-target="rewrite-comm" class="button insert-left" title="左揃え"></span>
<span data-target="rewrite-comm" class="button insert-center" title="中央揃え"></span>
<span data-target="rewrite-comm" class="button insert-right" title="右揃え"></span>
<span data-target="rewrite-comm" class="button insert-add-line-spacing" title="行送りを大きく"></span>

<span class="button end insert-headline" title="見出し">
<select data-target="rewrite-comm">
Expand Down
1 change: 1 addition & 0 deletions lib/js/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@ function tagConvert (comm){
.replace(/&lt;left&gt;(.*?)&lt;\/left&gt;/gis ,'<div class="left">$1</div>')
.replace(/&lt;center&gt;(.*?)&lt;\/center&gt;\n?/gis,'<div class="center">$1</div>')
.replace(/&lt;right&gt;(.*?)&lt;\/right&gt;\n?/gis ,'<div class="right">$1</div>')
.replace(/&lt;add-line-spacing&gt;(.*?)&lt;\/add-line-spacing&gt;\n?/gis ,'<div class="add-line-spacing">$1</div>')
.replace(/&lt;h([1-6])&gt;(.*?)&lt;\/h\1&gt;\n?/gis ,'<h$1>$2</h$1>')
.replace(/((?:^|>)[^<]*?)(https?:\/\/)([^\s\<]+)/gi,'$1<a href="$2$3" target="_blank">$3</a>')
}
Expand Down
3 changes: 3 additions & 0 deletions lib/js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,9 @@ document.querySelectorAll('.insert-center').forEach(obj => { obj.addEventListene
document.querySelectorAll('.insert-right').forEach(obj => { obj.addEventListener('click', (e)=>{
tagInsert(e, '<right>','</right>')
}); });
document.querySelectorAll('.insert-add-line-spacing').forEach(obj => { obj.addEventListener('click', (e)=>{
tagInsert(e, '<add-line-spacing>','</add-line-spacing>')
}); });
document.querySelectorAll('.insert-headline select').forEach(obj => { obj.addEventListener('input', (e)=>{
const lv = e.target.value;
if(!lv){ return; }
Expand Down