Automatically enter folders when file-scrolling
This commit is contained in:
parent
46b873e71d
commit
de342265b1
|
@ -12,7 +12,7 @@ const addScrollHints = () => {
|
|||
if (fileElement.classList.contains('file-viewed')) {
|
||||
hint.classList.add('sages-extra-breadcrumbs-viewed')
|
||||
}
|
||||
hint.innerText = `${prefix} ${decodeURIComponent(fileElement.firstElementChild?.href?.split('#')[1] || 'Folder')}`
|
||||
hint.innerText = `${prefix} ${decodeURIComponent(fileElement.firstElementChild?.href?.split('#')[1] || 'In Folder...')}`
|
||||
if (top) {
|
||||
hint.style.top = top
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ const addScrollHints = () => {
|
|||
|
||||
}
|
||||
|
||||
const changeFile = e => {
|
||||
const changeFile = (e, noRecurse) => {
|
||||
const selectedFile = getSelectedFile()
|
||||
const fileElements = getFileElements()
|
||||
|
||||
|
@ -42,9 +42,13 @@ const changeFile = e => {
|
|||
(up && index > 0) ? fileElements[index - 1] :
|
||||
(!up && index < (fileElements.length - 1)) ? fileElements[index + 1] :
|
||||
null
|
||||
const isFolder = !nextElement?.firstElementChild
|
||||
const toClick = nextElement?.firstElementChild ?? nextElement
|
||||
toClick?.focus()
|
||||
toClick?.click()
|
||||
if (isFolder) {
|
||||
changeFile(e)
|
||||
}
|
||||
}
|
||||
|
||||
let styled = false
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "Sage's BitBucket Addon",
|
||||
"description": "Ensure searches don't include forks (and other enhancements)",
|
||||
"version": "1.0.11",
|
||||
"version": "1.0.12",
|
||||
"manifest_version": 2,
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
|
|
Loading…
Reference in New Issue