Changed name for auto save

This commit is contained in:
xevidos 2018-07-17 13:37:02 -04:00
parent ffbb309ba2
commit 2900522462
4 changed files with 0 additions and 70 deletions

View file

@ -1,3 +0,0 @@
# Codiad Plugin
Tela Auto Save
Saves your current working file every 500ms.

View file

@ -1,60 +0,0 @@
/*
* Place copyright or other info here...
*/
(function(global, $){
// Define core
var codiad = global.codiad,
scripts= document.getElementsByTagName('script'),
path = scripts[scripts.length-1].src.split('?')[0],
curpath = path.split('/').slice(0, -1).join('/')+'/';
// Instantiates plugin
$(function() {
codiad.tela_auto_save.init();
});
codiad.tela_auto_save = {
// Allows relative `this.path` linkage
path: curpath,
init: function() {
// Start your plugin here...
//let editor = document.getElementsByClassName( 'ace_content' )[0];
let auto_save_trigger = setInterval( this.auto_save, 500 );
},
/**
*
* This is where the core functionality goes, any call, references,
* script-loads, etc...
*
*/
auto_save: function() {
if ( codiad.active.getPath() === null ) {
return;
}
let tabs = document.getElementsByClassName( "tab-item" );
let path = codiad.active.getPath();
let content = codiad.editor.getContent();
codiad.active.save;
codiad.filemanager.saveFile(path, content, localStorage.removeItem(path), false);
var session = codiad.active.sessions[path];
if(typeof session != 'undefined') {
session.untainted = content;
session.serverMTime = session.serverMTime;
if (session.listThumb) session.listThumb.removeClass('changed');
if (session.tabThumb) session.tabThumb.removeClass('changed');
}
}
};
})(this, jQuery);

View file

@ -1,6 +0,0 @@
[{
"author": "Isaac Brown",
"version": "1.0.0",
"name": "Tela Auto Save",
"url": "https://telaaedifex.com"
}]

View file

@ -1 +0,0 @@
/* Any needed CSS directives... */