navigator.share

This commit is contained in:
2019-06-04 20:14:25 +02:00
parent 1261563f31
commit 0b8d67a8eb
4 changed files with 17 additions and 6 deletions

View File

@@ -110,10 +110,20 @@ var Toolbar = {
}
};
var Sharebar = {
visible: false,
toggle: function(){
if (navigator.share) {
navigator.share({
title: Viewer.title,
text: "Get this file from Pixeldrain!",
url: window.location.href
});
return;
}
if (!Toolbar.visible){
Toolbar.toggle();
}