mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Fix add the window.cowyo to the rest of the vars
This commit is contained in:
1131
bindata.go
1131
bindata.go
File diff suppressed because one or more lines are too long
@@ -39,7 +39,7 @@ $(window).load(function() {
|
|||||||
$('#saveEditButton').removeClass()
|
$('#saveEditButton').removeClass()
|
||||||
$('#saveEditButton').text("Saving")
|
$('#saveEditButton').text("Saving")
|
||||||
upload();
|
upload();
|
||||||
}, window.debounceMS));
|
}, window.cowyo.debounceMS));
|
||||||
|
|
||||||
var latestUpload = null, needAnother = false;
|
var latestUpload = null, needAnother = false;
|
||||||
function upload() {
|
function upload() {
|
||||||
@@ -54,7 +54,7 @@ $(window).load(function() {
|
|||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
new_text: $('#userInput').val(),
|
new_text: $('#userInput').val(),
|
||||||
page: window.cowyo.pageName,
|
page: window.cowyo.pageName,
|
||||||
fetched_at: window.lastFetch,
|
fetched_at: window.cowyo.lastFetch,
|
||||||
}),
|
}),
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
latestUpload = null;
|
latestUpload = null;
|
||||||
@@ -62,7 +62,7 @@ $(window).load(function() {
|
|||||||
$('#saveEditButton').removeClass()
|
$('#saveEditButton').removeClass()
|
||||||
if (data.success == true) {
|
if (data.success == true) {
|
||||||
$('#saveEditButton').addClass("success");
|
$('#saveEditButton').addClass("success");
|
||||||
window.lastFetch = data.unix_time;
|
window.cowyo.lastFetch = data.unix_time;
|
||||||
|
|
||||||
if (needAnother) {
|
if (needAnother) {
|
||||||
upload();
|
upload();
|
||||||
|
Reference in New Issue
Block a user