mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 20:12:45 +08:00
FEATURE: disable native share API on non tablets/phones
Native share API works fantastically on phones/tablets but on full desktop it is confusing.
This commit is contained in:
parent
a2babcafd8
commit
157dc5e298
|
@ -1,5 +1,10 @@
|
|||
export function nativeShare(data) {
|
||||
const caps = Discourse.__container__.lookup("capabilities:main");
|
||||
return new Ember.RSVP.Promise((resolve, reject) => {
|
||||
if (!(caps.isIOS || caps.isAndroid || caps.isWinphone)) {
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
if (
|
||||
window.location.protocol === "https:" &&
|
||||
typeof window.navigator.share !== "undefined"
|
||||
|
|
Loading…
Reference in New Issue
Block a user