How to use the hellojs.default function in hellojs

To help you get started, we’ve selected a few hellojs examples, based on popular ways it is used in public projects.

github SamsungInternet / snapwat / src / pages / snapshot.js View on Github external
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;
github SamsungInternet / snapwat / src / pages / share.js View on Github external
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

hellojs

A clientside Javascript library for standardizing requests to OAuth2 web services (and OAuth1 - with a shim)

MIT
Latest version published 1 year ago

Package Health Score

62 / 100
Full package analysis