Skip to content

Commit

Permalink
Open directly the popup if the service is just one (#132)
Browse files Browse the repository at this point in the history
- Related to #113 issue
  • Loading branch information
Sav22999 committed Oct 5, 2020
1 parent 4202b35 commit 9d7bdf2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifest.json
Expand Up @@ -3,7 +3,7 @@
"description": "This extension reimplement the share feature with Container support and over 14+ social networks",
"manifest_version": 2,
"name": "Share Backported",
"version": "2.0.11",
"version": "2.0.12",
"icons": {
"16": "icon-dark.svg",
"24": "icon-dark.svg",
Expand Down
7 changes: 7 additions & 0 deletions modal/modal.js
Expand Up @@ -15,6 +15,13 @@ function resize_modal() {
column = 3;
}

var shares = document.querySelectorAll(".share").length;
if (shares === 1) {
document.getElementsByClassName("share")[0].click(function() {
window.close();
});
}

var width_modal = column * 76;
row = Math.ceil(shares / column);
var height_modal = row * 76;
Expand Down

0 comments on commit 9d7bdf2

Please sign in to comment.