Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async share() {
console.log(location.href);
console.log(location.origin);
console.log(location.hostname);
let shareURL = location.href;
if (location.origin.includes('localhost')) {
shareURL = `https://wavex-app.firebaseapp.com/${location.pathname}`;
}
if (Haptics) {
Haptics.impact({
style: HapticsImpactStyle.Light
})
}
if (Share && !(window as any).Windows) {
await Share.share({
title: 'wavex',
text: 'Check out this podcast!',
url: shareURL,
dialogTitle: 'Share this podcast'
});
}
else if ((window as any).Windows) {
console.log('trying to share');
const DataTransferManager = (window as any).Windows.ApplicationModel.DataTransfer.DataTransferManager;
const dataTransferManager = DataTransferManager.getForCurrentView();
async share() {
console.log(location.href);
console.log(location.origin);
console.log(location.hostname);
let shareURL = location.href;
if (location.origin.includes('localhost')) {
shareURL = `https://wavex-app.firebaseapp.com/${location.pathname}`;
}
if (Haptics) {
Haptics.impact({
style: HapticsImpactStyle.Light
})
}
if (Share && !(window as any).Windows) {
await Share.share({
title: 'wavex',
text: 'Check out this podcast!',
url: shareURL,
dialogTitle: 'Share this podcast'
});
}
else if ((window as any).Windows) {
console.log('trying to share');
const DataTransferManager = (window as any).Windows.ApplicationModel.DataTransfer.DataTransferManager;
const dataTransferManager = DataTransferManager.getForCurrentView();
async getStarted() {
if (Haptics) {
Haptics.impact({
style: HapticsImpactStyle.Light
})
}
const nav: any = await (this.nav as any).componentOnReady();
nav.setRoot('app-home', null, { animated: false, direction: 'forward' });
localStorage.setItem('seen', 'true');
}
async homePlay() {
if (this.musicSrc) {
if (Haptics) {
Haptics.impact({
style: HapticsImpactStyle.Light
})
}
this.playing = true;
if (this.audioEl) {
await this.audioEl.play();
if ((window as any).ExperimentalBadge) {
(window as any).ExperimentalBadge.set();
}
if ((window as any).Windows) {
this.systemMediaControls.playbackStatus = (window as any).Windows.Media.MediaPlaybackStatus.playing;
}
}
} else {
hapticsImpactLight(style) {
this.hapticsImpact(HapticsImpactStyle.Light);
}