add revert page
This commit is contained in:
parent
9fed2175de
commit
a16b45cdba
10 changed files with 79 additions and 47 deletions
|
@ -10,7 +10,6 @@ $(function(){
|
|||
|
||||
var editor
|
||||
, autoInterval
|
||||
, keyCheck // used to detect changes not made via keyup
|
||||
, profile =
|
||||
{
|
||||
theme: 'ace/theme/idle_fingers'
|
||||
|
@ -331,11 +330,6 @@ $(function(){
|
|||
* @return {Void}
|
||||
*/
|
||||
function saveFile(isManual){
|
||||
if (!keyCheck && profile.currentMd != editor.getSession().getValue()) {
|
||||
previewMd();
|
||||
console.log(keyCheck);
|
||||
}
|
||||
keyCheck = false;
|
||||
updateUserProfile({currentMd: editor.getSession().getValue()});
|
||||
|
||||
if (isManual) {
|
||||
|
@ -536,8 +530,7 @@ $(function(){
|
|||
* @return {Void}
|
||||
*/
|
||||
function bindPreview(){
|
||||
$('#editor').bind('keyup', function() {
|
||||
keyCheck = true;
|
||||
editor.getSession().on('change', function(e) {
|
||||
previewMd();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue