mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
default body line-height 1.4 -> 1.2
added goonchat buttons to increase/decrease body line-height
This commit is contained in:
@@ -13,7 +13,7 @@ body {
|
||||
background: #fff;
|
||||
font-family: Verdana, sans-serif;
|
||||
font-size: 9pt;
|
||||
line-height: 1.4;
|
||||
line-height: 1.2;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
word-wrap: break-word;
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
<div class="sub" id="subOptions">
|
||||
<a href="#" class="subCell decreaseFont topCell" id="decreaseFont"><span>Decrease font size</span> <i class="icon-font">-</i></a>
|
||||
<a href="#" class="subCell increaseFont" id="increaseFont"><span>Increase font size</span> <i class="icon-font">+</i></a>
|
||||
<a href="#" class="subCell decreaseLineHeight" id="decreaseLineHeight"><span>Decrease line height</span> <i class="icon-text-height">-</i></a>
|
||||
<a href="#" class="subCell increaseLineHeight" id="increaseLineHeight"><span>Increase line height</span> <i class="icon-text-height">+</i></a>
|
||||
<a href="#" class="subCell togglePing" id="togglePing"><span>Toggle ping display</span> <i class="icon-circle"></i></a>
|
||||
<a href="#" class="subCell highlightTerm" id="highlightTerm"><span>Highlight string</span> <i class="icon-tag"></i></a>
|
||||
<a href="#" class="subCell saveLog" id="saveLog"><span>Save chat log</span> <i class="icon-save"></i></a>
|
||||
|
||||
@@ -593,6 +593,7 @@ $(function() {
|
||||
******************************************/
|
||||
var savedConfig = {
|
||||
'sfontSize': getCookie('fontsize'),
|
||||
'slineHeight': getCookie('lineheight'),
|
||||
'spingDisabled': getCookie('pingdisabled'),
|
||||
'shighlightTerms': getCookie('highlightterms'),
|
||||
'shighlightColor': getCookie('highlightcolor'),
|
||||
@@ -604,6 +605,10 @@ $(function() {
|
||||
$messages.css('font-size', savedConfig.sfontSize);
|
||||
internalOutput('<span class="internal boldnshit">Loaded font size setting of: '+savedConfig.sfontSize+'</span>', 'internal');
|
||||
}
|
||||
if (savedConfig.slineHeight) {
|
||||
$("body").css('line-height', savedConfig.slineHeight);
|
||||
internalOutput('<span class="internal boldnshit">Loaded line height setting of: '+savedConfig.slineHeight+'</span>', 'internal');
|
||||
}
|
||||
if (savedConfig.spingDisabled) {
|
||||
if (savedConfig.spingDisabled == 'true') {
|
||||
opts.pingDisabled = true;
|
||||
@@ -843,6 +848,28 @@ $(function() {
|
||||
internalOutput('<span class="internal boldnshit">Font size set to '+fontSize+'</span>', 'internal');
|
||||
});
|
||||
|
||||
$('#decreaseLineHeight').click(function(e) {
|
||||
var Heightline = parseFloat($("body").css('line-height'));
|
||||
var Sizefont = parseFloat($("body").css('font-size'));
|
||||
var lineheightvar = Heightline / Sizefont
|
||||
lineheightvar -= 0.1;
|
||||
lineheightvar = lineheightvar.toFixed(1)
|
||||
$("body").css({'line-height': lineheightvar});
|
||||
setCookie('lineheight', lineheightvar, 365);
|
||||
internalOutput('<span class="internal boldnshit">Line height set to '+lineheightvar+'</span>', 'internal');
|
||||
});
|
||||
|
||||
$('#increaseLineHeight').click(function(e) {
|
||||
var Heightline = parseFloat($("body").css('line-height'));
|
||||
var Sizefont = parseFloat($("body").css('font-size'));
|
||||
var lineheightvar = Heightline / Sizefont
|
||||
lineheightvar += 0.1;
|
||||
lineheightvar = lineheightvar.toFixed(1)
|
||||
$("body").css({'line-height': lineheightvar});
|
||||
setCookie('lineheight', lineheightvar, 365);
|
||||
internalOutput('<span class="internal boldnshit">Line height set to '+lineheightvar+'</span>', 'internal');
|
||||
});
|
||||
|
||||
$('#togglePing').click(function(e) {
|
||||
if (opts.pingDisabled) {
|
||||
$('#ping').slideDown('fast');
|
||||
|
||||
Reference in New Issue
Block a user