Added Bing verifying file
This commit is contained in:
parent
5b4ceb7462
commit
c91a80ace6
4
BingSiteAuth.xml
Normal file
4
BingSiteAuth.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<users>
|
||||||
|
<user>5E47EE6F67B069C17E3CDD418351A612</user>
|
||||||
|
</users>
|
30
index.html
30
index.html
@ -75,7 +75,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="viewer.html" title="Viewer"><i
|
<li><a href="viewer.html" title="Viewer"><i
|
||||||
class="icon-fullscreen"></i> Open in viewer</a></li>
|
class="icon-fullscreen"></i> Open viewer</a></li>
|
||||||
<li><a class="action-download-md" href="#"><i
|
<li><a class="action-download-md" href="#"><i
|
||||||
class="icon-download-alt"></i> Save as Markdown</a></li>
|
class="icon-download-alt"></i> Save as Markdown</a></li>
|
||||||
<li><a class="action-download-html" href="#"><i
|
<li><a class="action-download-html" href="#"><i
|
||||||
@ -111,7 +111,7 @@
|
|||||||
</ul></li>
|
</ul></li>
|
||||||
<li><a href="#" data-toggle="modal"
|
<li><a href="#" data-toggle="modal"
|
||||||
data-target="#modal-manage-publish" class="action-reset-input"><i
|
data-target="#modal-manage-publish" class="action-reset-input"><i
|
||||||
class="icon-share"></i> Manage publishing</a></li>
|
class="icon-share"></i> Manage publication</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li><a href="#" data-toggle="modal"
|
<li><a href="#" data-toggle="modal"
|
||||||
data-target="#modal-settings" class="action-load-settings"><i
|
data-target="#modal-settings" class="action-load-settings"><i
|
||||||
@ -363,7 +363,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group modal-publish-wordpress">
|
<div class="control-group modal-publish-wordpress">
|
||||||
<label class="control-label" for="input-publish-tumblr-hostname">WordPress site</label>
|
<label class="control-label" for="input-publish-tumblr-hostname">WordPress
|
||||||
|
site</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" id="input-publish-wordpress-site"
|
<input type="text" id="input-publish-wordpress-site"
|
||||||
placeholder="exemple.wordpress.com">
|
placeholder="exemple.wordpress.com">
|
||||||
@ -385,7 +386,8 @@
|
|||||||
placeholder="Label1, Label2">
|
placeholder="Label1, Label2">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group modal-publish-tumblr modal-publish-wordpress">
|
<div
|
||||||
|
class="control-group modal-publish-tumblr modal-publish-wordpress">
|
||||||
<label class="control-label" for="input-publish-tags">Tags
|
<label class="control-label" for="input-publish-tags">Tags
|
||||||
(comma separated)</label>
|
(comma separated)</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
@ -451,7 +453,7 @@
|
|||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal"
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
aria-hidden="true">×</button>
|
aria-hidden="true">×</button>
|
||||||
<h3>Publishing</h3>
|
<h3>Publication</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p class="msg-publish-list hide">"<span class="file-title"></span>"
|
<p class="msg-publish-list hide">"<span class="file-title"></span>"
|
||||||
@ -519,14 +521,14 @@
|
|||||||
<input type="checkbox" id="input-settings-enable-mathjax" />
|
<input type="checkbox" id="input-settings-enable-mathjax" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="input-settings-lazy-rendering">Lazy
|
<label class="control-label" for="input-settings-lazy-rendering">Lazy
|
||||||
rendering <a href="#" class="tooltip-lazy-rendering">(?)</a>
|
rendering <a href="#" class="tooltip-lazy-rendering">(?)</a>
|
||||||
</label>
|
</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="checkbox" id="input-settings-lazy-rendering" />
|
<input type="checkbox" id="input-settings-lazy-rendering" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="input-settings-scroll-link">Scroll
|
<label class="control-label" for="input-settings-scroll-link">Scroll
|
||||||
Link <a href="#" class="tooltip-scroll-link">(?)</a>
|
Link <a href="#" class="tooltip-scroll-link">(?)</a>
|
||||||
@ -714,7 +716,7 @@
|
|||||||
|
|
||||||
<div id="modal-app-reset" class="modal hide">
|
<div id="modal-app-reset" class="modal hide">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h3>Application reset</h3>
|
<h3>Reset application</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>This will delete all your local documents.</p>
|
<p>This will delete all your local documents.</p>
|
||||||
|
@ -44,7 +44,7 @@ define([ "core", "underscore" ], function(core) {
|
|||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* chain() calls the next onRun callback or the onSuccess callbacks when
|
* chain() calls the next onRun callback or the onSuccess callbacks when
|
||||||
* finished. The optional callback parameter can be used to add a onRun
|
* finished. The optional callback parameter can be used to pass an onRun
|
||||||
* callback during execution.
|
* callback during execution.
|
||||||
*/
|
*/
|
||||||
task.chain = function(callback) {
|
task.chain = function(callback) {
|
||||||
@ -72,7 +72,7 @@ define([ "core", "underscore" ], function(core) {
|
|||||||
runCallback();
|
runCallback();
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* error() calls the onError callbacks with the error parameter and ends
|
* error() calls the onError callbacks passing the error parameter and ends
|
||||||
* the task by throwing an exception.
|
* the task by throwing an exception.
|
||||||
*/
|
*/
|
||||||
task.error = function(error) {
|
task.error = function(error) {
|
||||||
@ -110,39 +110,37 @@ define([ "core", "underscore" ], function(core) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Run the next task in the queue if any and no other running
|
// Run the next task in the queue if any and no other running
|
||||||
function runTask() {
|
asyncRunner.runTask = function() {
|
||||||
|
// Use defer to avoid stack overflow
|
||||||
|
_.defer(function() {
|
||||||
|
|
||||||
// If there is a task currently running
|
// If there is a task currently running
|
||||||
if (currentTaskRunning === true) {
|
if (currentTaskRunning === true) {
|
||||||
// If the current task takes too long
|
// If the current task takes too long
|
||||||
if (currentTaskStartTime + currentTask.timeout < core.currentTime) {
|
if (currentTaskStartTime + currentTask.timeout < core.currentTime) {
|
||||||
currentTask.error(new Error("A timeout occurred."));
|
currentTask.error(new Error("A timeout occurred."));
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentTask === undefined) {
|
|
||||||
// If no task in the queue
|
|
||||||
if (taskQueue.length === 0) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dequeue an enqueued task
|
if (currentTask === undefined) {
|
||||||
currentTask = taskQueue.shift();
|
// If no task in the queue
|
||||||
currentTaskStartTime = core.currentTime;
|
if (taskQueue.length === 0) {
|
||||||
core.showWorkingIndicator(true);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run the task
|
// Dequeue an enqueued task
|
||||||
if (currentTaskStartTime <= core.currentTime) {
|
currentTask = taskQueue.shift();
|
||||||
currentTaskRunning = true;
|
currentTaskStartTime = core.currentTime;
|
||||||
currentTask.chain();
|
core.showWorkingIndicator(true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
asyncRunner.runTask = function() {
|
// Run the task
|
||||||
// Use defer to avoid stack overflow
|
if (currentTaskStartTime <= core.currentTime) {
|
||||||
_.defer(runTask);
|
currentTaskRunning = true;
|
||||||
|
currentTask.chain();
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
// Run runTask function periodically
|
// Run runTask function periodically
|
||||||
core.addPeriodicCallback(asyncRunner.runTask);
|
core.addPeriodicCallback(asyncRunner.runTask);
|
||||||
|
@ -5,14 +5,14 @@ define(
|
|||||||
|
|
||||||
var core = {};
|
var core = {};
|
||||||
|
|
||||||
// Usage: callback = callback || core.doNothing;
|
// For convenience
|
||||||
core.doNothing = function() {};
|
core.doNothing = function() {};
|
||||||
|
|
||||||
// Time shared by others modules
|
// Time shared by others modules
|
||||||
core.currentTime = new Date().getTime();
|
|
||||||
function updateCurrentTime() {
|
function updateCurrentTime() {
|
||||||
core.currentTime = new Date().getTime();
|
core.currentTime = new Date().getTime();
|
||||||
}
|
}
|
||||||
|
updateCurrentTime();
|
||||||
|
|
||||||
// Used for periodic tasks
|
// Used for periodic tasks
|
||||||
var intervalId = undefined;
|
var intervalId = undefined;
|
||||||
|
@ -52,6 +52,7 @@ define(["jquery", "core", "synchronizer", "publisher", "sharing", "text!../WELCO
|
|||||||
fileIndex = fileManager.getCurrentFileIndex();
|
fileIndex = fileManager.getCurrentFileIndex();
|
||||||
$("#wmd-input").val(localStorage[fileIndex + ".content"]);
|
$("#wmd-input").val(localStorage[fileIndex + ".content"]);
|
||||||
core.createEditor(function() {
|
core.createEditor(function() {
|
||||||
|
// Callback to save content when textarea changes
|
||||||
fileManager.saveFile();
|
fileManager.saveFile();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -81,11 +82,14 @@ define(["jquery", "core", "synchronizer", "publisher", "sharing", "text!../WELCO
|
|||||||
// Create the file in the localStorage
|
// Create the file in the localStorage
|
||||||
localStorage[fileIndex + ".content"] = content;
|
localStorage[fileIndex + ".content"] = content;
|
||||||
localStorage[fileIndex + ".title"] = title;
|
localStorage[fileIndex + ".title"] = title;
|
||||||
|
// Store syncIndexes associated to the file
|
||||||
var sync = _.reduce(syncIndexes, function(sync, syncIndex) {
|
var sync = _.reduce(syncIndexes, function(sync, syncIndex) {
|
||||||
return sync + syncIndex + ";";
|
return sync + syncIndex + ";";
|
||||||
}, ";");
|
}, ";");
|
||||||
localStorage[fileIndex + ".sync"] = sync;
|
localStorage[fileIndex + ".sync"] = sync;
|
||||||
|
// Store publishIndexes associated to the file
|
||||||
localStorage[fileIndex + ".publish"] = ";";
|
localStorage[fileIndex + ".publish"] = ";";
|
||||||
|
// Add the index to the file list
|
||||||
if(!isTemporary) {
|
if(!isTemporary) {
|
||||||
localStorage["file.list"] += fileIndex + ";";
|
localStorage["file.list"] += fileIndex + ";";
|
||||||
}
|
}
|
||||||
@ -104,21 +108,23 @@ define(["jquery", "core", "synchronizer", "publisher", "sharing", "text!../WELCO
|
|||||||
_.each(syncIndexList, function(syncIndex) {
|
_.each(syncIndexList, function(syncIndex) {
|
||||||
fileManager.removeSync(syncIndex);
|
fileManager.removeSync(syncIndex);
|
||||||
});
|
});
|
||||||
localStorage.removeItem(fileIndex + ".sync");
|
|
||||||
|
|
||||||
// Remove publish locations
|
// Remove publish locations
|
||||||
var publishIndexList = _.compact(localStorage[fileIndex + ".publish"].split(";"));
|
var publishIndexList = _.compact(localStorage[fileIndex + ".publish"].split(";"));
|
||||||
_.each(publishIndexList, function(publishIndex) {
|
_.each(publishIndexList, function(publishIndex) {
|
||||||
fileManager.removePublish(publishIndex);
|
fileManager.removePublish(publishIndex);
|
||||||
});
|
});
|
||||||
localStorage.removeItem(fileIndex + ".publish");
|
|
||||||
|
|
||||||
|
// Remove the index from the file list
|
||||||
localStorage["file.list"] = localStorage["file.list"].replace(";"
|
localStorage["file.list"] = localStorage["file.list"].replace(";"
|
||||||
+ fileIndex + ";", ";");
|
+ fileIndex + ";", ";");
|
||||||
localStorage.removeItem(fileIndex + ".title");
|
localStorage.removeItem(fileIndex + ".title");
|
||||||
localStorage.removeItem(fileIndex + ".content");
|
localStorage.removeItem(fileIndex + ".content");
|
||||||
|
localStorage.removeItem(fileIndex + ".sync");
|
||||||
|
localStorage.removeItem(fileIndex + ".publish");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Save current file in localStorage
|
||||||
fileManager.saveFile = function() {
|
fileManager.saveFile = function() {
|
||||||
var content = $("#wmd-input").val();
|
var content = $("#wmd-input").val();
|
||||||
var fileIndex = fileManager.getCurrentFileIndex();
|
var fileIndex = fileManager.getCurrentFileIndex();
|
||||||
|
Loading…
Reference in New Issue
Block a user