Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions data/js/conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if (typeof conf == 'undefined') var conf = {};
conf = {

var conf = {

vars: {
'platform': 'Chrome'
Expand Down Expand Up @@ -71,14 +71,14 @@ default_prefs: {
, 'readlater_username': ''
, 'readlater_password': ''
// Advanced:
, 'api_base': 'https://api.twitter.com/1/'
, 'sign_api_base': 'https://api.twitter.com/1/'
, 'api_base': 'https://api.twitter.com/1.1/'
, 'sign_api_base': 'https://api.twitter.com/1.1/'
, 'use_same_sign_api_base': true
, 'oauth_base': 'https://api.twitter.com/oauth/'
, 'sign_oauth_base': 'https://api.twitter.com/oauth/'
, 'use_same_sign_oauth_base': true
, 'search_api_base2': 'https://twitter.com/phoenix_search.phoenix'
, 'upload_api_base': 'https://upload.twitter.com/1/'
, 'upload_api_base': 'https://upload.twitter.com/1.1/'
// extensions and others
, 'exts_enabled': ["org.hotot.imagepreview", "org.hotot.gmap", "org.hotot.translate", "org.hotot.imageupload", "org.hotot.videopreview", "org.hotot.shorturl", "org.hotot.cfw"]
, 'kismet_rules': []
Expand Down Expand Up @@ -315,16 +315,8 @@ function apply_prefs(name, full) {
if ($.fx.off || !prefs.enable_gpu_acceleration) {
$.fn.transition = $.fn.animate;
}

globals.twitterClient.api_base = (function(api_base) {
if(api_base.indexOf('/1/') !== -1) {
return api_base.replace(/\/1\/$/, '/');
} else if(api_base.indexOf('/1.1/') !== -1) {
return api_base.replace(/\/1\.1\/$/, '/');
} else {
return api_base;
}
})(prefs.api_base);

globals.twitterClient.api_base = prefs.api_base;
globals.twitterClient.sign_api_base = prefs.sign_api_base;
globals.twitterClient.search_api_base2 = prefs.search_api_base2;
globals.twitterClient.upload_api_base = prefs.upload_api_base;
Expand Down