This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//install media capture, file chooser, file transfer, camera plugins from ionic 2 native plaugins and don't forget to add providers in | |
app.component.ts | |
import { Component } from '@angular/core'; | |
import { NavController, NavParams,ActionSheetController } from 'ionic-angular'; | |
import { MediaCapture, MediaFile, CaptureError, CaptureImageOptions,CaptureVideoOptions } from '@ionic-native/media-capture'; | |
import { Camera, CameraOptions } from '@ionic-native/camera'; | |
import { Transfer, FileUploadOptions, TransferObject } from '@ionic-native/transfer'; | |
import { FileChooser } from '@ionic-native/file-chooser'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// server.js | |
const express = require('express'); | |
const app = express(); | |
const path = require('path'); | |
const http = require('http'); | |
const https = require('https'); | |
const forceSSL = function () { | |
return function (req, res, next) { | |
if (req.headers['x-forwarded-proto'] !== 'https') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First make sure the wrapper app is loaded | |
document.addEventListener("DOMContentLoaded", function() { | |
// Then get its webviews | |
let webviews = document.querySelectorAll(".TeamView webview"); | |
// Fetch our CSS in parallel ahead of time | |
const cssPath = 'https://raw.githubusercontent.com/Nockiro/slack-black-theme/master/custom.css'; | |
let cssPromise = fetch(cssPath).then(response => response.text()); |