Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as hellojs from 'hellojs';
import {HEADER_HEIGHT} from '../shared/constants';
import {playCameraSound} from '../shared/audio';
import AnnotatePage from './annotate';
import SharePage from './share';
import {PAGES} from '../shared/constants';
import {showPage, showPrompt} from '../shared/helpers';
const hello = hellojs.default;
const PAGE_NAME = PAGES.SNAPSHOT;
let backBtn = document.getElementById('btn-back-snapshot');
let tweetButton = document.getElementById('btn-share-twitter');
let drawingCanvas = document.getElementById('canvas-draw');
let saveCanvas = document.getElementById('canvas-save');
let saveImage = document.getElementById('image-save');
let saveCtx = saveCanvas.getContext('2d');
let cameraCanvas;
function initSave() {
// May have been swapped out after initial app load
cameraCanvas = document.getElementById('canvas-camera');
saveCanvas.width = cameraCanvas.width;
import * as hellojs from 'hellojs';
import {PAGES} from '../shared/constants';
import AnnotatePage from './annotate';
import SnapshotPage from './snapshot';
import {dataURItoBlob, showPage, showPrompt} from '../shared/helpers';
const hello = hellojs.default;
const PAGE_NAME = PAGES.SHARE;
const TWITTER_CLIENT_PROD = 'bkMmxlirv04KxJtAbWSgekbVM';
const TWITTER_CLIENT_DEV = 'Eqrm5IQ5zgLUfZXrgpVuntjvA';
let saveCanvas = document.getElementById('canvas-save');
let backBtn = document.getElementById('btn-back-share');
let shareTextInput = document.getElementById('share-text');
let shareImagePreview = document.getElementById('share-preview');
let shareSubmitButton = document.getElementById('share-submit');
let twitterUsernameDisplay = document.getElementById('twitter-username');
let imageDataURI = null;
function initOAuth() {
hello.init({
twitter: window.location.hostname === 'localhost' ? TWITTER_CLIENT_DEV : TWITTER_CLIENT_PROD