mirror of
https://github.com/10h30/full-screen-morphing-search.git
synced 2026-06-05 15:08:32 +09:00
Better MutationObserver for Cat and Tag
This commit is contained in:
@@ -44,8 +44,7 @@ jQuery(document).ready(function ($) {
|
||||
function callbackCategory(mutationList) {
|
||||
mutationList.forEach(function (mutation) {
|
||||
if (mutation.type == 'childList') {
|
||||
var $length = targetNodeCat.children().length;
|
||||
if ($length == 5) {
|
||||
if (mutation.target.childNodes.length == 1) {
|
||||
targetNodeCat.append(fsmsp_cp.fsmsp_category_icon);
|
||||
}
|
||||
}
|
||||
@@ -61,8 +60,7 @@ jQuery(document).ready(function ($) {
|
||||
function callbackTag(mutationList) {
|
||||
mutationList.forEach(function (mutation) {
|
||||
if (mutation.type == 'childList') {
|
||||
var $length = targetNodeTag.children().length;
|
||||
if ($length == 5) {
|
||||
if (mutation.target.childNodes.length == 1) {
|
||||
targetNodeTag.append(fsmsp_cp.fsmsp_tag_icon);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user