|
|
@@ -873,9 +873,10 @@ function auto_share(key) {
|
|
|
if (!share) {
|
|
|
return;
|
|
|
}
|
|
|
- const shares = share.parentElement.querySelectorAll('.dropdown-menu .item [data-type]');
|
|
|
+ let shares;
|
|
|
if (typeof key === 'undefined') {
|
|
|
show_share_menu(share);
|
|
|
+ shares = share.parentElement.querySelectorAll('.dropdown-menu .item [data-type]');
|
|
|
|
|
|
// Display the share div
|
|
|
location.hash = share.id;
|
|
|
@@ -895,6 +896,7 @@ function auto_share(key) {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+ shares = share.parentElement.querySelectorAll('.dropdown-menu .item [data-type]');
|
|
|
// Trigger selected share action and hide the share div
|
|
|
key = parseInt(key);
|
|
|
if (key <= shares.length) {
|