Commit 2cc06891 authored by  JosephK's avatar JosephK

Default colors in lowercase

parent 759d08c1
Pipeline #45051 passed with stages
in 56 seconds
......@@ -2,7 +2,7 @@
(function sense3() {
let sense3Baseurl = '';
const defaultColors = ['#FFFFFF', '#963425', '#333333', '#757575', '#963425', '#CCCCCC'];
const defaultColors = ['#ffffff', '#963425', '#333333', '#757575', '#963425', '#cccccc'];
const i18n = {
en: {
close: 'Close',
......@@ -419,7 +419,7 @@
let [format, tags, colors, id] = scripts[i].getAttribute('data-sense3').split(';');
format = format || '300x250';
tags = tags || '';
colors = colors || defaultColors.join();
colors = colors || defaultColors.join().toLowerCase();
id = id || '';
const [w, h] = format.split('x');
......@@ -655,7 +655,7 @@
const html = `
<form class="form-horizontal" id="sense3_generator" onsubmit="document.getElementById('sense3_code').className = ''; sense3Generate(); return false;">
<input type="hidden" id="sense3Baseurl" value="${sense3Baseurl}">
<input type="hidden" id="sense3DefaultColors" value="${defaultColors.join()}">
<input type="hidden" id="sense3DefaultColors" value="${defaultColors.join().toLowerCase()}">
<fieldset id="banner">
<legend>${i18n[lg].banner}</legend>
<div class="row">
......@@ -694,19 +694,19 @@
<div class="form-group">
<label for="bg" class="col-sm-4 control-label">${i18n[lg].background}</label>
<div class="col-sm-8">
<input id="bg" value="${defaultColors[0]}" class="form-control" type="color">
<input id="bg" value="${defaultColors[0].toLowerCase()}" class="form-control" type="color">
</div>
</div>
<div class="form-group">
<label for="h1" class="col-sm-4 control-label">${i18n[lg].text1}</label>
<div class="col-sm-8">
<input id="h1" value="${defaultColors[1]}" class="form-control" type="color">
<input id="h1" value="${defaultColors[1].toLowerCase()}" class="form-control" type="color">
</div>
</div>
<div class="form-group">
<label for="h2" class="col-sm-4 control-label">${i18n[lg].text2}</label>
<div class="col-sm-8">
<input id="h2" value="${defaultColors[2]}" class="form-control" type="color">
<input id="h2" value="${defaultColors[2].toLowerCase()}" class="form-control" type="color">
</div>
</div>
</div>
......@@ -714,19 +714,19 @@
<div class="form-group">
<label for="p" class="col-sm-4 control-label">${i18n[lg].link}</label>
<div class="col-sm-8">
<input id="p" value="${defaultColors[3]}" class="form-control" type="color">
<input id="p" value="${defaultColors[3].toLowerCase()}" class="form-control" type="color">
</div>
</div>
<div class="form-group">
<label for="btn" class="col-sm-4 control-label">${i18n[lg].button}</label>
<div class="col-sm-8">
<input id="btn" value="${defaultColors[4]}" class="form-control" type="color">
<input id="btn" value="${defaultColors[4].toLowerCase()}" class="form-control" type="color">
</div>
</div>
<div class="form-group">
<label for="bdr" class="col-sm-4 control-label">${i18n[lg].border}</label>
<div class="col-sm-8">
<input id="bdr" value="${defaultColors[5]}" class="form-control" type="color">
<input id="bdr" value="${defaultColors[5].toLowerCase()}" class="form-control" type="color">
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment