toogle with mouseover

This commit is contained in:
cutls
2020-09-11 21:25:27 +09:00
parent 81c476c1bb
commit 9f4f788519
3 changed files with 14 additions and 39 deletions

View File

@@ -335,6 +335,13 @@ function cardCheck(tlid) {
}
function mov(id, tlid, type) {
const dropdownTrigger = `dropdown_${tlid}_${id}`
const elm = document.getElementById(dropdownTrigger)
const instance = M.Dropdown.getInstance(elm)
if(instance) {
if(instance.isOpen) return false
}
var click = false
if (tlid == 'notf') {
var tlide = '[data-notf=' + acct_id + ']'
@@ -361,9 +368,9 @@ function mov(id, tlid, type) {
}
if (mouseover == 'hide') {
if (click) {
$(tlide + ' [toot-id=' + id + ']').toggleClass('hide-actions')
$(tlide + ' [unique-id=' + id + ']').toggleClass('hide-actions')
} else {
$(tlide + ' [toot-id=' + id + ']').removeClass('hide-actions')
$(tlide + ' [unique-id=' + id + ']').removeClass('hide-actions')
}
//$(tlide + " [toot-id=" + id + "] .area-vis").toggleClass("hide")

View File

@@ -1032,8 +1032,8 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
'unix'
)}"
${if_notf}
onmouseover="mov('${toot.id}','${tlid}','mv')"
onclick="mov('${toot.id}','${tlid}','cl')"
onmouseover="mov('${uniqueid}','${tlid}','mv')"
onclick="mov('${uniqueid}','${tlid}','cl')"
onmouseout="resetmv('mv')"
>
<div class="area-notice grid"><span class="gray sharesta">${notice}${home}</span></div>