mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2026-01-04 01:49:37 +05:00
KeepPlayerFocus pref, rework prefs page, always autoplay if you click on the next track
This commit is contained in:
9
static/assets/keepfocus.js
Normal file
9
static/assets/keepfocus.js
Normal file
@@ -0,0 +1,9 @@
|
||||
var audio = document.getElementById('track');
|
||||
audio.onblur = function (e) {
|
||||
if (e.target != e.relatedTarget) {
|
||||
setTimeout(function() {
|
||||
e.target.focus({preventScroll: true, focusVisible: false});
|
||||
})
|
||||
}
|
||||
}
|
||||
audio.focus({focusVisible: false});
|
||||
Reference in New Issue
Block a user