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'], '*') postMessage(['sendSinmpleIpc', 'custom-css-request'], '*')
function makeCID() { incrementid=0
return uuid() function makeCID()
{
return incrementid++
} }
function rgbToHex(color) { 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}` const dropdownTrigger = `dropdown_${rand}`
let elm = document.querySelector(`#timeline_${tlid} #${dropdownTrigger}`) let elm = document.querySelector(`#timeline_${tlid} #${dropdownTrigger}`)
if(tlid == 'notf') { 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-actions").toggleClass("hide")
//$(tlide + " [toot-id=" + id + "] .area-side").toggleClass("hide") //$(tlide + " [toot-id=" + id + "] .area-side").toggleClass("hide")
} }
} }*/
function resetmv(type) { function resetmv(type) {
var mouseover = localStorage.getItem('mouseover') var mouseover = localStorage.getItem('mouseover')

View File

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

View File

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

View File

@ -645,7 +645,7 @@
class="material-icons left">list</i>Help/Docs</a> 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="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> <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> Kyash
<br> <br>
<img src="../../img/kyash.png" width="100"><br> <img src="../../img/kyash.png" width="100"><br>
@ -653,7 +653,7 @@
<img src="https://status.cutls.com/badge-service?site=thedesk.top"> <img src="https://status.cutls.com/badge-service?site=thedesk.top">
</a><br> </a><br>
<h5>OSS License</h5> <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> <br>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk 2018 <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 Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a