Stackedit/public/res/constants.js

82 lines
4.5 KiB
JavaScript
Raw Normal View History

2013-11-05 23:03:38 +00:00
define([], function() {
var constants = {};
2014-05-28 08:05:52 +00:00
constants.VERSION = "3.99.9";
2013-11-05 23:03:38 +00:00
constants.MAIN_URL = "https://stackedit.io/";
constants.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1";
constants.GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw";
constants.GOOGLE_DRIVE_APP_ID = "241271498917";
constants.DROPBOX_APP_KEY = "lq6mwopab8wskas";
constants.DROPBOX_APP_SECRET = "851fgnucpezy84t";
2013-12-23 22:46:49 +00:00
constants.DROPBOX_RESTRICTED_APP_KEY = "sw0hlixhr8q1xk0";
constants.DROPBOX_RESTRICTED_APP_SECRET = "1r808p2xygs6lbg";
2013-11-05 23:03:38 +00:00
constants.BITLY_ACCESS_TOKEN = "317e033bfd48cf31155a68a536b1860013b09c4c";
constants.DEFAULT_FILE_TITLE = "Title";
constants.DEFAULT_FOLDER_NAME = "New folder";
constants.GDRIVE_DEFAULT_FILE_TITLE = "New Markdown document";
2014-03-24 00:22:46 +00:00
constants.EDITOR_DEFAULT_PADDING = 35;
2013-11-05 23:03:38 +00:00
constants.CHECK_ONLINE_PERIOD = 120000;
constants.AJAX_TIMEOUT = 30000;
constants.ASYNC_TASK_DEFAULT_TIMEOUT = 60000;
constants.ASYNC_TASK_LONG_TIMEOUT = 180000;
constants.USER_IDLE_THRESHOLD = 300000;
constants.IMPORT_FILE_MAX_CONTENT_SIZE = 100000;
constants.IMPORT_IMG_MAX_CONTENT_SIZE = 10000000;
constants.TEMPORARY_FILE_INDEX = "file.tempIndex";
constants.WELCOME_DOCUMENT_TITLE = "Welcome document";
constants.DOWNLOAD_PROXY_URL = "https://stackedit-download-proxy.herokuapp.com/";
constants.PICASA_PROXY_URL = "https://stackedit-picasa-proxy.herokuapp.com/";
constants.SSH_PROXY_URL = "https://stackedit-ssh-proxy.herokuapp.com/";
constants.HTMLTOPDF_URL = "https://stackedit-htmltopdf.herokuapp.com/";
2014-03-24 00:22:46 +00:00
2014-05-04 17:31:57 +00:00
// Site dependent
2013-11-05 23:03:38 +00:00
constants.BASE_URL = "http://localhost/";
constants.GOOGLE_CLIENT_ID = '241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com';
constants.GITHUB_CLIENT_ID = 'e47fef6055344579799d';
constants.GATEKEEPER_URL = "https://stackedit-gatekeeper-localhost.herokuapp.com/";
constants.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy-local.herokuapp.com/";
constants.WORDPRESS_CLIENT_ID = '23361';
constants.WORDPRESS_PROXY_URL = "https://stackedit-io-wordpress-proxy.herokuapp.com/";
2014-03-24 00:22:46 +00:00
2013-11-05 23:03:38 +00:00
if(location.hostname.indexOf("stackedit.io") === 0) {
constants.BASE_URL = constants.MAIN_URL;
constants.GOOGLE_CLIENT_ID = '241271498917-t4t7d07qis7oc0ahaskbif3ft6tk63cd.apps.googleusercontent.com';
constants.GITHUB_CLIENT_ID = '710fc67886ab1ae8fee6';
constants.GATEKEEPER_URL = "https://stackedit-io-gatekeeper.herokuapp.com/";
constants.TUMBLR_PROXY_URL = "https://stackedit-io-tumblr-proxy.herokuapp.com/";
}
2013-12-16 00:31:40 +00:00
else if(location.hostname.indexOf("benweet.github.io") === 0) {
2013-11-05 23:03:38 +00:00
constants.BASE_URL = 'http://benweet.github.io/stackedit/';
constants.GOOGLE_CLIENT_ID = '241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com';
constants.GITHUB_CLIENT_ID = 'fa0d09514da8377ee32e';
constants.GATEKEEPER_URL = "https://stackedit-gatekeeper.herokuapp.com/";
constants.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy.herokuapp.com/";
constants.WORDPRESS_CLIENT_ID = '3185';
constants.WORDPRESS_PROXY_URL = "https://stackedit-wordpress-proxy.herokuapp.com/";
}
2014-04-21 16:24:48 +00:00
else if(location.hostname.indexOf("stackedit-beta.herokuapp.com") === 0) {
constants.BASE_URL = 'https://stackedit-beta.herokuapp.com/';
constants.GOOGLE_CLIENT_ID = '241271498917-9bbplknkt0ljv5gaudhoiogp13hd18be.apps.googleusercontent.com';
constants.GITHUB_CLIENT_ID = 'e9034ae191c3a8a1c5ed';
constants.GATEKEEPER_URL = "https://stackedit-beta-gatekeeper.herokuapp.com/";
constants.TUMBLR_PROXY_URL = "https://stackedit-beta-tumblr-proxy.herokuapp.com/";
constants.WORDPRESS_CLIENT_ID = '34786';
constants.WORDPRESS_PROXY_URL = "https://stackedit-beta-wordpress-proxy.herokuapp.com/";
}
2013-12-16 00:31:40 +00:00
else if(location.hostname.indexOf("benweet.insomnia247.nl") === 0) {
2013-11-05 23:03:38 +00:00
constants.BASE_URL = "http://benweet.insomnia247.nl/stackedit/";
constants.GOOGLE_CLIENT_ID = '241271498917-52hae7a08hv7ltenv7km8h7lghno9sk3.apps.googleusercontent.com';
constants.GITHUB_CLIENT_ID = 'd2943d6074b2d9c4a830';
constants.GATEKEEPER_URL = "https://stackedit-gatekeeper-insomnia.herokuapp.com/";
constants.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy-beta.herokuapp.com/";
}
2014-03-24 00:22:46 +00:00
2013-11-05 23:03:38 +00:00
constants.THEME_LIST = {
"default": "Default",
2013-12-02 00:09:39 +00:00
"gray": "Gray",
2013-11-05 23:03:38 +00:00
"night": "Night",
2013-12-03 09:27:15 +00:00
"school": "School",
2013-11-05 23:03:38 +00:00
};
2014-03-24 00:22:46 +00:00
2013-11-09 00:09:42 +00:00
return constants;
2013-11-05 23:03:38 +00:00
});