From 2900522462ef1ac6c5e890f838ebeaae4b1d77a9 Mon Sep 17 00:00:00 2001 From: xevidos Date: Tue, 17 Jul 2018 13:37:02 -0400 Subject: [PATCH] Changed name for auto save --- plugins/auto_save/README.md | 3 -- plugins/auto_save/init.js | 60 ----------------------------------- plugins/auto_save/plugin.json | 6 ---- plugins/auto_save/screen.css | 1 - 4 files changed, 70 deletions(-) delete mode 100755 plugins/auto_save/README.md delete mode 100755 plugins/auto_save/init.js delete mode 100755 plugins/auto_save/plugin.json delete mode 100755 plugins/auto_save/screen.css diff --git a/plugins/auto_save/README.md b/plugins/auto_save/README.md deleted file mode 100755 index 90af24c..0000000 --- a/plugins/auto_save/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Codiad Plugin -Tela Auto Save -Saves your current working file every 500ms. \ No newline at end of file diff --git a/plugins/auto_save/init.js b/plugins/auto_save/init.js deleted file mode 100755 index 97e5290..0000000 --- a/plugins/auto_save/init.js +++ /dev/null @@ -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); \ No newline at end of file diff --git a/plugins/auto_save/plugin.json b/plugins/auto_save/plugin.json deleted file mode 100755 index ee7f717..0000000 --- a/plugins/auto_save/plugin.json +++ /dev/null @@ -1,6 +0,0 @@ -[{ - "author": "Isaac Brown", - "version": "1.0.0", - "name": "Tela Auto Save", - "url": "https://telaaedifex.com" -}] diff --git a/plugins/auto_save/screen.css b/plugins/auto_save/screen.css deleted file mode 100755 index 2be8c00..0000000 --- a/plugins/auto_save/screen.css +++ /dev/null @@ -1 +0,0 @@ -/* Any needed CSS directives... */ \ No newline at end of file