Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.

Commit e79cdc3

Browse files
committed
feature (cheese): allow to take pictures right after the countdown
Change-Id: Id6a8c2ae33025e7344bf8de0196d9628d8ff3494
1 parent 54e71d9 commit e79cdc3

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

config/config.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
$config['force_buzzer'] = false;
3939
// control countdown timer in seconds
4040
$config['cntdwn_time'] = '5';
41+
$config['no_cheese'] = false;
4142
// control time for cheeeeese! in milliseconds
4243
$config['cheese_time'] = '1000';
4344
// control time in milliseconds until Photobooth reloads automatically

lib/configsetup.inc.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@
160160
'range_step' => 1,
161161
'unit' => 'seconds'
162162
],
163+
'no_cheese' => [
164+
'type' => 'checkbox',
165+
'name' => 'no_cheese',
166+
'value' => $config['no_cheese']
167+
],
163168
'cheese_time' => [
164169
'type' => 'range',
165170
'placeholder' => $defaultConfig['cheese_time'],

resources/lang/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@
203203
"manual_mail_text": "Enter the mail text which is used while sending pictures via email.",
204204
"manual_mail_username": "Enter the username used to login into your email account.",
205205
"manual_newest_first": "If enabled, latest images will be shown first inside the gallery.",
206+
"manual_no_cheese": "If enabled, pictures will be taken right after the countdown. This skips the \"Cheeeeeeeese!\" message.",
206207
"manual_polaroid_effect": "If enabled, a polaroid effect is applied to your picture after it was taken.",
207208
"manual_preserve_exif_data": "If enabled, EXIF data is preserved while taking pictures. Please setup \"Preserve EXIF data\" inside the \"Commands\" tab.",
208209
"manual_previewCamBackground": "If enabled, a stream from your device cam is used as background on start screen.",
@@ -284,6 +285,7 @@
284285
"newPhoto": "New Picture",
285286
"newest_first": "Show latest images first",
286287
"nextPhoto": "Next Picture",
288+
"no_cheese": "Take picture right after the countdown",
287289
"path": "Path:",
288290
"percent": "%",
289291
"polaroid_effect": "Polaroid effect",

src/js/core.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ const photoBooth = (function () {
250250
$('#counter').empty();
251251
$('.cheese').empty();
252252

253-
if (photoStyle === 'photo') {
253+
if (config.no_cheese) {
254+
console.log('Cheese is disabled.');
255+
} else if (photoStyle === 'photo') {
254256
const cheesemsg = i18n('cheese');
255257
$('.cheese').text(cheesemsg);
256258
} else {
@@ -272,6 +274,8 @@ const photoBooth = (function () {
272274
api.errorPic({
273275
error: 'No preview by device cam available!'
274276
});
277+
} else if (config.no_cheese) {
278+
api.takePic(photoStyle);
275279
} else {
276280
setTimeout(() => {
277281
api.takePic(photoStyle);

0 commit comments

Comments
 (0)