Mouseover/click for action buttons now works properly in notification trays, and unique ID for elements is now actually unique.

This commit is contained in:
Zergling_man 2021-07-11 13:27:41 +10:00
parent ab460d1401
commit f45ab949b2
5 changed files with 20 additions and 8 deletions

View File

@ -99,8 +99,10 @@ function formattimeutc(date) {
}
postMessage(['sendSinmpleIpc', 'custom-css-request'], '*')
function makeCID() {
return uuid()
incrementid=0
function makeCID()
{
return incrementid++
}
function rgbToHex(color) {

View File

@ -335,7 +335,17 @@ function cardCheck(tlid) {
}
}
function mov(id, tlid, type, rand, target) {
function mov(id, tlid, type, rand, target)
{
mouseover=localStorage.getItem('mouseover')
switch (mouseover)
{
case 'yes': if (type=='mv') $(target).removeClass('hide-actions'); break;
case 'click': if (type=='cl') $(target).toggleClass('hide-actions'); break;
case 'no': break;
}
}
/*function mov(id, tlid, type, rand, target) {
const dropdownTrigger = `dropdown_${rand}`
let elm = document.querySelector(`#timeline_${tlid} #${dropdownTrigger}`)
if(tlid == 'notf') {
@ -383,7 +393,7 @@ function mov(id, tlid, type, rand, target) {
//$(tlide + " [toot-id=" + id + "] .area-actions").toggleClass("hide")
//$(tlide + " [toot-id=" + id + "] .area-side").toggleClass("hide")
}
}
}*/
function resetmv(type) {
var mouseover = localStorage.getItem('mouseover')

View File

@ -994,7 +994,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type, onlyContent) {
menuct++
}
//このトゥート内のアクションを完了させるために、適当にIDを振る
var rand = uuid()
var rand = makeCID()
//プラグイン機構
var pluginBOT = plugins.buttonOnToot
var pluginHtml = ''

View File

@ -26,7 +26,7 @@
<body class="">
<script>
var ver = '22.3.0 (Koume)'
var gitHash = '679151e8eadafebe68b8c0887e9189caeb94474e'
var gitHash = 'ab460d14015eae75d1feccf0594373e5b9aee9ea'
//betaを入れるとバージョンチェックしない
//var ver="beta";
var acct_id = 0

View File

@ -645,7 +645,7 @@
class="material-icons left">list</i>Help/Docs</a>
<a href="https://github.com/cutls/TheDesk" class="btn waves-effect black lighten-2" style="width:100%; max-width:40rem;"><i class="fab fa-github left"></i>GitHub</a>
<a href="index.html?mode=user&code=Cutls@1m.cutls.com" class="btn waves-effect blue lighten-2" style="width:100%; max-width:40rem;"><img src="../../img/desk_full.svg" class="left" width="25" style="padding-top:5px;">Main author: Cutls@1m.cutls.com</a>
<br> TheDesk @ <a href="https://github.com/cutls/TheDesk/commits/679151e8eadafebe68b8c0887e9189caeb94474e">679151e8eadafebe68b8c0887e9189caeb94474e</a> - <a onclick="checkupd(); return localStorage.removeItem('new-ver-skip'); location.href='index.html';" class="pointer pwa">Sprawdź aktualizacje</a><br>
<br> TheDesk @ <a href="https://github.com/cutls/TheDesk/commits/ab460d14015eae75d1feccf0594373e5b9aee9ea">ab460d14015eae75d1feccf0594373e5b9aee9ea</a> - <a onclick="checkupd(); return localStorage.removeItem('new-ver-skip'); location.href='index.html';" class="pointer pwa">Sprawdź aktualizacje</a><br>
<br> Kyash
<br>
<img src="../../img/kyash.png" width="100"><br>
@ -653,7 +653,7 @@
<img src="https://status.cutls.com/badge-service?site=thedesk.top">
</a><br>
<h5>OSS License</h5>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fcutls%2FTheDesk/refs/branch/master/679151e8eadafebe68b8c0887e9189caeb94474e" alt="FOSSA Status"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcutls%2FTheDesk.svg?type=small" /></a>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fcutls%2FTheDesk/refs/branch/master/ab460d14015eae75d1feccf0594373e5b9aee9ea" alt="FOSSA Status"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcutls%2FTheDesk.svg?type=small" /></a>
<br>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk 2018
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a