codiad/data/collaborative/text/0874412e2b238973158064bf29510f49

59 lines
No EOL
1.2 KiB
Text
Executable file

s:1170:"/*
* 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() {
let tabs = document.getElementsByClassName( "tab-item" );
tabs = Array.from( tabs );
tabs.forEach( function( m, i, a ) {
// M = Current entry
// I = Index as integer
// A = Entire array
if ( m.classList.contains( "active" ) ) {
m.classList.remove( "changed" )
}
});
codiad.active.save;
}
};
})(this, jQuery);
";