serii@serii-Lenovo-G710 ~/Загрузки $ jpg 10 t2-10.jpg
jpegoptim: skipping special file: 10
t2-10.jpg 1200x1800 24bit N Exif XMP IPTC Adobe [OK] 857488 --> 109021 bytes (87.29%), optimized.
Average compression (1 files): 87.29% (731k)
serii@serii-Lenovo-G710 ~/Загрузки $
jpg() {
jpegoptim --strip-all --all-progressive -ptm "$1" "$2"
}
jpg() {
jpegoptim --strip-all --all-progressive -ptm "$*" "$X"
}
jpegoptim --strip-all --all-progressive -ptm10 t2-10.jpg
serii@serii-Lenovo-G710 ~/Загрузки $ j 10 t2-10.jpg
jpegoptim: skipping special file: 10 t2-10.jpg
Average compression (0 files): -nan% (0k)
serii@serii-Lenovo-G710 ~/Загрузки $
Что-то не то написал.
Я в воскресенье займусь изучением bash скриптов. Очень они нужны.
let setVideoTime = function () {
video.volume = 0.1;
setInterval(function () {
let videoTime = video.currentTime;
localStorage.setItem(vlink, videoTime);
}, 1000);
video.addEventListener('pause', function () {
let videoTime = video.currentTime;
localStorage.setItem(vlink, videoTime);
});
};
setVideoTime();
let disableSeeking = function () {
let previousTime = localStorage.getItem(vlink);
video.addEventListener('timeupdate', function (evt) {
if (!video.seeking) {
previousTime = Math.max(previousTime, video.currentTime);
}
}, false);
video.addEventListener('seeking', function (evt) {
if (video.currentTime > previousTime) {
video.currentTime = previousTime;
}
}, true);
};
let video = document.querySelector('.no-forward');
let vlink = document.querySelector('video > source').getAttribute('src'); // Запишет в переменную vlink ссылку на видео
if(!localStorage.getItem(vlink)) {
localStorage.setItem(vlink, '0');
}else{
video.currentTime = localStorage.getItem(vlink);
}
let setVideoTime = function () {
video.volume = 0.1;
setInterval(function () {
let videoTime = video.currentTime;
localStorage.setItem(vlink, videoTime);
}, 1000);
video.addEventListener('pause', function () {
let videoTime = video.currentTime;
localStorage.setItem(vlink, videoTime);
});
}
setVideoTime();
let disableSeeking = function () {
// let previousTime = 0;
let previousTime = localStorage.setItem(vlink, videoTime);
video.addEventListener('timeupdate', function (evt) {
if (!video.seeking) {
previousTime = Math.max(previousTime, video.currentTime);
}
}, false);
video.addEventListener('seeking', function (evt) {
if (video.currentTime > previousTime) {
video.currentTime = previousTime;
}
}, true);
};
let seekVideo = function () {
if(!$('body').hasClass('administrator')){
disableSeeking();
}
};
seekVideo();
let videoSrc = document.querySelector('video source').getAttribute('src');
if(!localStorage.getItem(videoSrc)) {
localStorage.setItem(videoSrc, '0');
}else{
video.currentTime = localStorage.getItem(videoSrc);
}
let setVideoTime = function () {
video.volume = 0.1;
function rememberTime(){
for (var i = 0; i < localStorage.length; i++) {
if(videoSrc == localStorage.key(i)){
let videoTime = video.currentTime;
localStorage.setItem(videoSrc, videoTime);
}
}
}
setInterval(function () {
rememberTime();
}, 1000);
video.addEventListener('pause', function () {
rememberTime();
});
}
setVideoTime();
if(!localStorage.getItem('video')) {
localStorage.setItem('video', '0');
}else{
video.currentTime = localStorage.getItem('video');
}
let setVideoTime = function () {
video.volume = 0.1;
setInterval(function () {
let videoTime = video.currentTime;
localStorage.setItem('video', videoTime);
}, 1000);
video.addEventListener('pause', function () {
let videoTime = video.currentTime;
localStorage.setItem('video', videoTime);
});
}
setVideoTime();