refs #136 Refactor findLink when click toot

This commit is contained in:
AkiraFukushima 2018-03-26 22:27:45 +09:00
parent 81fc81bf76
commit 07ef933238
3 changed files with 9 additions and 0 deletions

View File

@ -67,6 +67,9 @@ function findLink (target) {
if (target.parentNode === undefined || target.parentNode === null) { if (target.parentNode === undefined || target.parentNode === null) {
return null return null
} }
if (target.parentNode.getAttribute('class') === 'favourite') {
return null
}
return findLink(target.parentNode) return findLink(target.parentNode)
} }
</script> </script>

View File

@ -67,6 +67,9 @@ function findLink (target) {
if (target.parentNode === undefined || target.parentNode === null) { if (target.parentNode === undefined || target.parentNode === null) {
return null return null
} }
if (target.parentNode.getAttribute('class') === 'reblog') {
return null
}
return findLink(target.parentNode) return findLink(target.parentNode)
} }
</script> </script>

View File

@ -138,6 +138,9 @@ function findLink (target) {
if (target.parentNode === undefined || target.parentNode === null) { if (target.parentNode === undefined || target.parentNode === null) {
return null return null
} }
if (target.parentNode.getAttribute('class') === 'toot') {
return null
}
return findLink(target.parentNode) return findLink(target.parentNode)
} }
</script> </script>