v1.18.x
Baris Soner Usakli 12 years ago
parent f83be710a0
commit ff805a704d

@ -53,10 +53,10 @@ define(['taskbar'], function(taskbar) {
function initializeFileReader() {
jQuery.event.props.push( "dataTransfer" );
console.log(config);
if(window.FileReader) {
var drop = $('.post-window .imagedrop');
var textarea = $('.post-window textarea');
var drop = $('.post-window .imagedrop'),
textarea = $('.post-window textarea');
textarea.on('dragenter', function() {
@ -90,7 +90,6 @@ define(['taskbar'], function(taskbar) {
return false;
});
}
}
@ -124,6 +123,7 @@ define(['taskbar'], function(taskbar) {
document.body.insertBefore(composer.postContainer, taskbar);
if(config.imgurClientIDSet)
initializeFileReader();
socket.on('api:composer.push', function(threadData) {

@ -16,7 +16,7 @@ var user = require('./../user.js'),
});
app.get('/api/config', function(req, res, next) {
meta.config.getFields(['postDelay', 'minimumTitleLength', 'minimumPostLength'], function(err, metaConfig) {
meta.config.getFields(['postDelay', 'minimumTitleLength', 'minimumPostLength', 'imgurClientID'], function(err, metaConfig) {
if(err) return next();
var clientConfig = require('../../public/config.json');
@ -24,6 +24,9 @@ var user = require('./../user.js'),
clientConfig[attrname] = metaConfig[attrname];
}
clientConfig['imgurClientIDSet'] = clientConfig['imgurClientID'] !== '';
delete clientConfig['imgurClientID'];
res.json(200, clientConfig);
})
});

Loading…
Cancel
Save