From 8045b1c1112defe2bbd7d6895203ebed9f92c66c Mon Sep 17 00:00:00 2001 From: Martii Date: Thu, 15 Apr 2021 23:35:23 -0600 Subject: [PATCH] Enable usage of the import kill switch * Disables *github* dep authorization which in turn disable importing. When activated use paste to site via Write Script Online or file upload via Upload Script until the dep can be successfully migrated. If authorization is enabled and there's a dep issue a 500 Server error could occur if GH changes something. * More bookmarks... can't quite tell if it's Fx but the bookmarks are shooting low on auto browser scroll... will try another browser at a future date. * Some verbiage clarity. Applies to #1705 --- libs/githubClient.js | 2 +- views/pages/newScriptPage.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/githubClient.js b/libs/githubClient.js index 2a9a34ca3..4ed5ad638 100644 --- a/libs/githubClient.js +++ b/libs/githubClient.js @@ -31,7 +31,7 @@ Strategy.findOne({ name: 'github' }, async function (aErr, aStrat) { if (aErr) console.error(aErr); - if (aStrat) { + if (aStrat && process.env.DISABLE_SCRIPT_IMPORT !== 'true') { // This authentication authorization is currently required to authorize this app // to have the GitHub authentication callback work when the strategy `id` and `key` is found // and additional usage of the `id` and `key` elsewhere in the Code diff --git a/views/pages/newScriptPage.html b/views/pages/newScriptPage.html index 7ac316767..e76304b46 100644 --- a/views/pages/newScriptPage.html +++ b/views/pages/newScriptPage.html @@ -26,14 +26,14 @@

UserScript Are you new to {{#newJSLibrary}}library {{/newJSLibrary}}{{^newJSLibrary}}user {{/newJSLibrary}} scripting and thought you would just dive right in without reading anything? Well if you change your mind check out some of our documentation by clicking here. Special thanks go out to all of our collaborators for all their dedication and effort.

- +

Write Script Online

Click here to write a script using the Ace editor.

-

Upload Script

+

Upload Script

@@ -352,7 +352,7 @@

-

Optionally you may upload the script to the site first. You may also use the link at Import Script from Github to speed things up as a shortcut.

+

You may use Write Script Online or Upload Script to the site first to determine if there are any validation issues. When the service is available you may use the link at Import Script from Github to speed things up as a shortcut.

  1. Ensure that you have GitHub as an authentication for this site.
  2. Ensure that you have and use a default master branch.