Skip to content

Commit 6e86fa9

Browse files
committed
Disable add button once already added
1 parent 0652d4b commit 6e86fa9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/content/show_button_inside_element.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ export function showButtonInsideElement(target, title, code) {
112112
event.preventDefault();
113113
event.stopPropagation();
114114

115+
if (button.classList.contains(`${MANAGE_BUTTON_CLASS_NAME}--added`)) {
116+
return;
117+
}
118+
115119
try {
116120
chrome.runtime.sendMessage({
117121
action: 'create_bookmark',

0 commit comments

Comments
 (0)