persist videoplayer prefs

This commit is contained in:
ed 2022-05-18 19:17:21 +02:00
parent 1f6f89c1fd
commit e74ad5132a
3 changed files with 6 additions and 5 deletions

View file

@ -35,8 +35,8 @@ window.baguetteBox = (function () {
documentLastFocus = null,
isFullscreen = false,
vmute = false,
vloop = false,
vnext = false,
vloop = sread('vmode') == 'L',
vnext = sread('vmode') == 'C',
resume_mp = false;
var onFSC = function (e) {
@ -320,6 +320,7 @@ window.baguetteBox = (function () {
btnVmode.setAttribute('aria-label', msg);
btnVmode.setAttribute('tt', msg + tts);
btnVmode.textContent = lbl;
swrite('vmode', lbl[0]);
v.loop = vloop
if (vloop && v.paused)

View file

@ -5298,7 +5298,7 @@ var settheme = (function () {
vbar.draw();
showfile.setstyle();
var html = [], itheme = ax.indexOf(theme.charAt(0)) * 2 + (light ? 1 : 0),
var html = [], itheme = ax.indexOf(theme[0]) * 2 + (light ? 1 : 0),
names = ['classic dark', 'classic light', 'pm-monokai', 'flat light', 'vice', 'hotdog stand'];
for (var a = 0; a < themes; a++)
@ -5318,7 +5318,7 @@ var settheme = (function () {
var i = e;
try { ev(e); i = e.target.textContent; } catch (ex) { }
light = i % 2 == 1;
var c = ax.charAt(Math.floor(i / 2)),
var c = ax[Math.floor(i / 2)],
l = light ? 'y' : 'z';
theme = c + l + ' ' + c + ' ' + l;
swrite('theme', theme);

View file

@ -471,7 +471,7 @@ function linksplit(rp, id) {
q = '?' + q[1];
}
if (rp && rp.charAt(0) == '/')
if (rp && rp[0] == '/')
rp = rp.slice(1);
while (rp) {