document oekaki.js ( vichan-devel/Tinyboard#26 )
This commit is contained in:
parent
2500f53701
commit
e201534123
30
js/oekaki.js
30
js/oekaki.js
@ -1,3 +1,22 @@
|
||||
/*
|
||||
* oekaki.js
|
||||
* https://github.com/vichan-devel/Tinyboard/blob/master/js/oekaki.js
|
||||
*
|
||||
* Warning: this script is unsupported and staged for deletion/replacement
|
||||
* Please consult this bug report:
|
||||
* https://github.com/vichan-devel/Tinyboard/issues/20
|
||||
*
|
||||
* Released under the MIT license
|
||||
* Copyright (c) 2013 copypaste <wizardchan@hush.com>
|
||||
* Copyright (c) 2013-2014 Marcin Łabanowski <marcin@6irc.net>
|
||||
*
|
||||
* Usage: (it wouldn't work when mixed with ajax.js)
|
||||
* $config['additional_javascript'][] = 'js/jquery.min.js';
|
||||
* $config['additional_javascript'][] = 'js/oekaki.js';
|
||||
* $config['additional_javascript'][] = 'js/jscolor/jscolor.js';
|
||||
* //$config['additional_javascript'][] = 'js/upload-selection.js';
|
||||
*/
|
||||
|
||||
$(function() {
|
||||
// Init
|
||||
var oekaki_form = '\
|
||||
@ -239,7 +258,16 @@ $("form[name='post']").on("submit", function(e){
|
||||
success: function(data) {
|
||||
location.reload();
|
||||
},
|
||||
error: function(jq, data) {alert($('h2',jq.responseText).text());}
|
||||
error: function(jq, data, et) {
|
||||
if (jq.responseText == '' && data == 'error') {
|
||||
//probably jquery bug, ignore
|
||||
location.reload();
|
||||
}
|
||||
else
|
||||
{
|
||||
alert($('h2',jq.responseText).text());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user