From 6d44ded2693bcc6685f6399a22694f1cd6f321b0 Mon Sep 17 00:00:00 2001 From: "Christoph (Sheogorath) Kern" Date: Wed, 16 May 2018 01:31:50 +0200 Subject: [PATCH] Revert "Workaround Google API problems" --- app.js | 2 +- lib/config/default.js | 1 - lib/config/environment.js | 1 - public/views/hackmd/header.ejs | 10 +++++++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 63b880c73..fcf905d59 100644 --- a/app.js +++ b/app.js @@ -33,7 +33,7 @@ var data = { urlpath: config.urlPath, debug: config.debug, version: config.version, - GOOGLE_API_KEY: config.google.apiKey, + GOOGLE_API_KEY: config.google.clientSecret, GOOGLE_CLIENT_ID: config.google.clientID, DROPBOX_APP_KEY: config.dropbox.appKey, allowedUploadMimeTypes: config.allowedUploadMimeTypes diff --git a/lib/config/default.js b/lib/config/default.js index db0c03629..68849d361 100644 --- a/lib/config/default.js +++ b/lib/config/default.js @@ -104,7 +104,6 @@ module.exports = { appKey: undefined }, google: { - apiKey: undefined, clientID: undefined, clientSecret: undefined }, diff --git a/lib/config/environment.js b/lib/config/environment.js index 8e1e51711..3dde47869 100644 --- a/lib/config/environment.js +++ b/lib/config/environment.js @@ -74,7 +74,6 @@ module.exports = { appKey: process.env.HMD_DROPBOX_APPKEY }, google: { - apiKey: process.env.HMD_GOOGLE_APIKEY, clientID: process.env.HMD_GOOGLE_CLIENTID, clientSecret: process.env.HMD_GOOGLE_CLIENTSECRET }, diff --git a/public/views/hackmd/header.ejs b/public/views/hackmd/header.ejs index 8fe7f5c93..e179f1710 100644 --- a/public/views/hackmd/header.ejs +++ b/public/views/hackmd/header.ejs @@ -32,11 +32,13 @@
  • <%= __('Slide Mode') %>
  • - <% if((typeof github !== 'undefined' && github) || (typeof dropbox !== 'undefined' && dropbox) || (typeof gitlab !== 'undefined' && gitlab && (!gitlab.scope || gitlab.scope === 'api'))) { %> + <% if((typeof github !== 'undefined' && github) || (typeof dropbox !== 'undefined' && dropbox) || (typeof google !== 'undefined' && google) || (typeof gitlab !== 'undefined' && gitlab && (!gitlab.scope || gitlab.scope === 'api'))) { %>
  • Dropbox
  • +
  • Google Drive +
  • <% if(typeof github !== 'undefined' && github) { %>
  • Gist
  • @@ -50,6 +52,8 @@
  • Dropbox
  • +
  • Google Drive +
  • Gist
  • <% if(typeof gitlab !== 'undefined' && gitlab && (!gitlab.scope || gitlab.scope === 'api')) { %> @@ -139,6 +143,8 @@
  • Dropbox
  • +
  • Google Drive +
  • <% if(typeof github !== 'undefined' && github) { %>
  • Gist
  • @@ -152,6 +158,8 @@
  • Dropbox
  • +
  • Google Drive +
  • Gist
  • <% if(typeof gitlab !== 'undefined' && gitlab && (!gitlab.scope || gitlab.scope === 'api')) { %>