Fixed Tumblr OAuth redirection on stackedit.io
This commit is contained in:
parent
ffad94a86f
commit
d5df369a8f
@ -48,7 +48,7 @@ if(location.hostname.indexOf("stackedit.io") === 0) {
|
|||||||
GOOGLE_CLIENT_ID = '241271498917-t4t7d07qis7oc0ahaskbif3ft6tk63cd.apps.googleusercontent.com';
|
GOOGLE_CLIENT_ID = '241271498917-t4t7d07qis7oc0ahaskbif3ft6tk63cd.apps.googleusercontent.com';
|
||||||
GITHUB_CLIENT_ID = '710fc67886ab1ae8fee6';
|
GITHUB_CLIENT_ID = '710fc67886ab1ae8fee6';
|
||||||
GATEKEEPER_URL = "https://stackedit-io-gatekeeper.herokuapp.com/";
|
GATEKEEPER_URL = "https://stackedit-io-gatekeeper.herokuapp.com/";
|
||||||
TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy.herokuapp.com/";
|
TUMBLR_PROXY_URL = "https://stackedit-io-tumblr-proxy.herokuapp.com/";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(location.hostname.indexOf("benweet.github.io") === 0) {
|
if(location.hostname.indexOf("benweet.github.io") === 0) {
|
||||||
|
@ -70,7 +70,7 @@ define([
|
|||||||
task.timeout = ASYNC_TASK_LONG_TIMEOUT;
|
task.timeout = ASYNC_TASK_LONG_TIMEOUT;
|
||||||
var code = undefined;
|
var code = undefined;
|
||||||
function oauthRedirect() {
|
function oauthRedirect() {
|
||||||
core.redirectConfirm('You are being redirected to <strong>GitHub</strong> authorization page', function() {
|
core.redirectConfirm('You are being redirected to <strong>GitHub</strong> authorization page.', function() {
|
||||||
task.chain(getCode);
|
task.chain(getCode);
|
||||||
}, function() {
|
}, function() {
|
||||||
task.error(new Error('Operation canceled.'));
|
task.error(new Error('Operation canceled.'));
|
||||||
|
@ -84,7 +84,7 @@ define([
|
|||||||
}
|
}
|
||||||
var immediate = true;
|
var immediate = true;
|
||||||
function oauthRedirect() {
|
function oauthRedirect() {
|
||||||
core.redirectConfirm('You are being redirected to <strong>Google</strong> authorization page', function() {
|
core.redirectConfirm('You are being redirected to <strong>Google</strong> authorization page.', function() {
|
||||||
task.chain(localAuthenticate);
|
task.chain(localAuthenticate);
|
||||||
}, function() {
|
}, function() {
|
||||||
task.error(new Error('Operation canceled.'));
|
task.error(new Error('Operation canceled.'));
|
||||||
|
@ -58,7 +58,7 @@ define([
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function oauthRedirect() {
|
function oauthRedirect() {
|
||||||
core.redirectConfirm('You are being redirected to <strong>Tumblr</strong> authorization page', function() {
|
core.redirectConfirm('You are being redirected to <strong>Tumblr</strong> authorization page.', function() {
|
||||||
task.chain(getVerifier);
|
task.chain(getVerifier);
|
||||||
}, function() {
|
}, function() {
|
||||||
task.error(new Error('Operation canceled.'));
|
task.error(new Error('Operation canceled.'));
|
||||||
|
@ -42,7 +42,7 @@ define([
|
|||||||
task.timeout = ASYNC_TASK_LONG_TIMEOUT;
|
task.timeout = ASYNC_TASK_LONG_TIMEOUT;
|
||||||
var code = undefined;
|
var code = undefined;
|
||||||
function oauthRedirect() {
|
function oauthRedirect() {
|
||||||
core.redirectConfirm('You are being redirected to <strong>WordPress</strong> authorization page', function() {
|
core.redirectConfirm('You are being redirected to <strong>WordPress</strong> authorization page.', function() {
|
||||||
task.chain(getCode);
|
task.chain(getCode);
|
||||||
}, function() {
|
}, function() {
|
||||||
task.error(new Error('Operation canceled.'));
|
task.error(new Error('Operation canceled.'));
|
||||||
|
@ -675,6 +675,8 @@
|
|||||||
<div class="col-lg-7">
|
<div class="col-lg-7">
|
||||||
<input type="text" id="input-publish-file-path"
|
<input type="text" id="input-publish-file-path"
|
||||||
placeholder="path/to/file.md" class="form-control">
|
placeholder="path/to/file.md" class="form-control">
|
||||||
|
<span class="help-block"> File path is composed of both
|
||||||
|
folder and filename. </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group modal-publish-gist">
|
<div class="form-group modal-publish-gist">
|
||||||
@ -745,6 +747,8 @@
|
|||||||
<div class="col-lg-7">
|
<div class="col-lg-7">
|
||||||
<input type="text" id="input-publish-dropbox-path"
|
<input type="text" id="input-publish-dropbox-path"
|
||||||
placeholder="/path/to/My Document.html" class="form-control">
|
placeholder="/path/to/My Document.html" class="form-control">
|
||||||
|
<span class="help-block"> File path is composed of both
|
||||||
|
folder and filename. </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group modal-publish-gdrive">
|
<div class="form-group modal-publish-gdrive">
|
||||||
@ -814,7 +818,7 @@
|
|||||||
<p><b>NOTE:</b> You can use a
|
<p><b>NOTE:</b> You can use a
|
||||||
<a href="http://jekyllrb.com/docs/frontmatter/"
|
<a href="http://jekyllrb.com/docs/frontmatter/"
|
||||||
target="_blank">YAML front matter</a> to specify the title and the tags/labels of your publication.</p>
|
target="_blank">YAML front matter</a> to specify the title and the tags/labels of your publication.</p>
|
||||||
<p><b>Interpreted variables:</b> <i>title, categories/tags</i></p>
|
<p><b>Interpreted variables:</b> <i>title, tags</i></p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -14,7 +14,6 @@ define([
|
|||||||
bloggerProvider.publish = function(publishAttributes, frontMatter, title, content, callback) {
|
bloggerProvider.publish = function(publishAttributes, frontMatter, title, content, callback) {
|
||||||
var labelList = publishAttributes.labelList || [];
|
var labelList = publishAttributes.labelList || [];
|
||||||
if(frontMatter) {
|
if(frontMatter) {
|
||||||
frontMatter.categories !== undefined && (labelList = frontMatter.categories);
|
|
||||||
frontMatter.tags !== undefined && (labelList = frontMatter.tags);
|
frontMatter.tags !== undefined && (labelList = frontMatter.tags);
|
||||||
}
|
}
|
||||||
_.isString(labelList) && (labelList = _.compact(labelList.split(/[\s,]/)));
|
_.isString(labelList) && (labelList = _.compact(labelList.split(/[\s,]/)));
|
||||||
|
@ -13,7 +13,6 @@ define([
|
|||||||
tumblrProvider.publish = function(publishAttributes, frontMatter, title, content, callback) {
|
tumblrProvider.publish = function(publishAttributes, frontMatter, title, content, callback) {
|
||||||
var labelList = publishAttributes.tags || [];
|
var labelList = publishAttributes.tags || [];
|
||||||
if(frontMatter) {
|
if(frontMatter) {
|
||||||
frontMatter.categories !== undefined && (labelList = frontMatter.categories);
|
|
||||||
frontMatter.tags !== undefined && (labelList = frontMatter.tags);
|
frontMatter.tags !== undefined && (labelList = frontMatter.tags);
|
||||||
}
|
}
|
||||||
_.isString(labelList) && (labelList = _.compact(labelList.split(/[\s,]/)));
|
_.isString(labelList) && (labelList = _.compact(labelList.split(/[\s,]/)));
|
||||||
|
@ -14,7 +14,6 @@ define([
|
|||||||
wordpressProvider.publish = function(publishAttributes, frontMatter, title, content, callback) {
|
wordpressProvider.publish = function(publishAttributes, frontMatter, title, content, callback) {
|
||||||
var labelList = publishAttributes.tags || [];
|
var labelList = publishAttributes.tags || [];
|
||||||
if(frontMatter) {
|
if(frontMatter) {
|
||||||
frontMatter.categories !== undefined && (labelList = frontMatter.categories);
|
|
||||||
frontMatter.tags !== undefined && (labelList = frontMatter.tags);
|
frontMatter.tags !== undefined && (labelList = frontMatter.tags);
|
||||||
}
|
}
|
||||||
_.isString(labelList) && (labelList = _.compact(labelList.split(/[\s,]/)));
|
_.isString(labelList) && (labelList = _.compact(labelList.split(/[\s,]/)));
|
||||||
|
Loading…
Reference in New Issue
Block a user