Spaces:
Running
Running
Mattthew
commited on
Commit
•
e92667d
1
Parent(s):
40c75f3
bug fix: updates to tags db won't break all
Browse files
index.js
CHANGED
@@ -887,11 +887,14 @@ function loadMostUsedTags() {
|
|
887 |
let mostUsedCategory = document.querySelector('[data-category-name="important"]');
|
888 |
for(let tag in state) {
|
889 |
if (state[tag]) {
|
890 |
-
let label = document.querySelector('input[name="'+ tag +'"]')
|
891 |
-
label
|
892 |
-
|
893 |
-
|
894 |
-
|
|
|
|
|
|
|
895 |
}
|
896 |
};
|
897 |
}
|
@@ -1096,7 +1099,6 @@ function copyStuffToClipboard(item,stuff) {
|
|
1096 |
' ' + item.closest('.image-item').getElementsByClassName('lastN')[0].textContent;
|
1097 |
doAlert('Copied to name clipboard!',1);
|
1098 |
} else if(stuff == 'tags') {
|
1099 |
-
console.log(item);
|
1100 |
var str = item.textContent;
|
1101 |
doAlert('Copied to tags clipboard!',1);
|
1102 |
}
|
|
|
887 |
let mostUsedCategory = document.querySelector('[data-category-name="important"]');
|
888 |
for(let tag in state) {
|
889 |
if (state[tag]) {
|
890 |
+
let label = document.querySelector('input[name="'+ tag +'"]');
|
891 |
+
if(label) {
|
892 |
+
label = label.parentNode;
|
893 |
+
label.classList.add('is_most_used');
|
894 |
+
label.querySelectorAll('.most_used_indicator')[0].textContent = '-';
|
895 |
+
mostUsedCategory.after(label);
|
896 |
+
updateTagArrayToMatchMostUsed(true,label,tag);
|
897 |
+
}
|
898 |
}
|
899 |
};
|
900 |
}
|
|
|
1099 |
' ' + item.closest('.image-item').getElementsByClassName('lastN')[0].textContent;
|
1100 |
doAlert('Copied to name clipboard!',1);
|
1101 |
} else if(stuff == 'tags') {
|
|
|
1102 |
var str = item.textContent;
|
1103 |
doAlert('Copied to tags clipboard!',1);
|
1104 |
}
|