mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-09-06 03:45:20 +02:00
* split `index.js` to separate files * tune clipboard * fix promise * fix document * remove intermediate empty file * fix async event listener * use `export function` instead of `export {}`, add more comments Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
11 lines
351 B
JavaScript
11 lines
351 B
JavaScript
import createColorPicker from '../colorpicker.js';
|
|
|
|
export function initCompColorPicker() {
|
|
createColorPicker($('.color-picker'));
|
|
|
|
$('.precolors .color').on('click', function () {
|
|
const color_hex = $(this).data('color-hex');
|
|
$('.color-picker').val(color_hex);
|
|
$('.minicolors-swatch-color').css('background-color', color_hex);
|
|
});
|
|
}
|