Added recaptcha script loading

This commit is contained in:
Liam Cardenas 2017-12-20 10:34:24 -08:00
parent e23094f655
commit dc9b8d535e
3 changed files with 24 additions and 0 deletions

View file

@ -28,6 +28,7 @@
"lbry" "lbry"
], ],
"dependencies": { "dependencies": {
"@segment/load-script": "^1.0.1",
"amplitude-js": "^4.0.0", "amplitude-js": "^4.0.0",
"classnames": "^2.2.5", "classnames": "^2.2.5",
"electron-dl": "^1.6.0", "electron-dl": "^1.6.0",

View file

@ -17,6 +17,9 @@ const env = process.env.NODE_ENV || "production";
const { remote, ipcRenderer, shell } = require("electron"); const { remote, ipcRenderer, shell } = require("electron");
const contextMenu = remote.require("./main.js").contextMenu; const contextMenu = remote.require("./main.js").contextMenu;
const app = require("./app"); const app = require("./app");
const load = require("@segment/load-script");
load("//www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit");
// Workaround for https://github.com/electron-userland/electron-webpack/issues/52 // Workaround for https://github.com/electron-userland/electron-webpack/issues/52
if (process.env.NODE_ENV !== "development") { if (process.env.NODE_ENV !== "development") {

View file

@ -34,6 +34,14 @@
version "0.0.6" version "0.0.6"
resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30" resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30"
"@segment/load-script@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@segment/load-script/-/load-script-1.0.1.tgz#adb7a2def2c99ac248cc8e2c154fb4bb03094399"
dependencies:
component-type "^1.2.0"
next-tick "^0.2.2"
script-onload "^1.0.2"
"@segment/top-domain@^3.0.0": "@segment/top-domain@^3.0.0":
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/@segment/top-domain/-/top-domain-3.0.0.tgz#02e5a5a4fd42a9f6cf886b05e82f104012a3c3a7" resolved "https://registry.yarnpkg.com/@segment/top-domain/-/top-domain-3.0.0.tgz#02e5a5a4fd42a9f6cf886b05e82f104012a3c3a7"
@ -1892,6 +1900,10 @@ component-cookie@^1.1.2:
dependencies: dependencies:
debug "*" debug "*"
component-type@^1.2.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/component-type/-/component-type-1.2.1.tgz#8a47901700238e4fc32269771230226f24b415a9"
component-url@^0.2.1: component-url@^0.2.1:
version "0.2.1" version "0.2.1"
resolved "https://registry.yarnpkg.com/component-url/-/component-url-0.2.1.tgz#4e4f4799c43ead9fd3ce91b5a305d220208fee47" resolved "https://registry.yarnpkg.com/component-url/-/component-url-0.2.1.tgz#4e4f4799c43ead9fd3ce91b5a305d220208fee47"
@ -5249,6 +5261,10 @@ next-event@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/next-event/-/next-event-1.0.0.tgz#e7778acde2e55802e0ad1879c39cf6f75eda61d8" resolved "https://registry.yarnpkg.com/next-event/-/next-event-1.0.0.tgz#e7778acde2e55802e0ad1879c39cf6f75eda61d8"
next-tick@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-0.2.2.tgz#75da4a927ee5887e39065880065b7336413b310d"
no-case@^2.2.0: no-case@^2.2.0:
version "2.3.2" version "2.3.2"
resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac"
@ -7198,6 +7214,10 @@ schema-utils@^0.3.0:
dependencies: dependencies:
ajv "^5.0.0" ajv "^5.0.0"
script-onload@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/script-onload/-/script-onload-1.0.2.tgz#6bdca122875487192ccaf4e6884fcfdd0c7fde32"
scss-tokenizer@^0.2.3: scss-tokenizer@^0.2.3:
version "0.2.3" version "0.2.3"
resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1"