aboutsummaryrefslogtreecommitdiff
path: root/data/stuff/tinymce-4.3.7/plugins/autosave
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-04-03 03:29:32 -0400
committerPaul Duncan <pabs@pablotron.org>2016-04-03 03:29:32 -0400
commit50ac423f6e3be7566c1106647158e81b6eaae44a (patch)
tree5aeddba59f956528ef4e4715940441a1619394c0 /data/stuff/tinymce-4.3.7/plugins/autosave
parentfda56e40b460ab06b6abee98ae1bc7d5f5847c9f (diff)
downloadold-guff-50ac423f6e3be7566c1106647158e81b6eaae44a.tar.bz2
old-guff-50ac423f6e3be7566c1106647158e81b6eaae44a.zip
remove tinymce
Diffstat (limited to 'data/stuff/tinymce-4.3.7/plugins/autosave')
-rw-r--r--data/stuff/tinymce-4.3.7/plugins/autosave/plugin.min.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/data/stuff/tinymce-4.3.7/plugins/autosave/plugin.min.js b/data/stuff/tinymce-4.3.7/plugins/autosave/plugin.min.js
deleted file mode 100644
index 11de44d..0000000
--- a/data/stuff/tinymce-4.3.7/plugins/autosave/plugin.min.js
+++ /dev/null
@@ -1 +0,0 @@
-tinymce._beforeUnloadHandler=function(){var a;return tinymce.each(tinymce.editors,function(b){b.plugins.autosave&&b.plugins.autosave.storeDraft(),!a&&b.isDirty()&&b.getParam("autosave_ask_before_unload",!0)&&(a=b.translate("You have unsaved changes are you sure you want to navigate away?"))}),a},tinymce.PluginManager.add("autosave",function(a){function b(a,b){var c={s:1e3,m:6e4};return a=/^(\d+)([ms]?)$/.exec(""+(a||b)),(a[2]?c[a[2]]:1)*parseInt(a,10)}function c(){var a=parseInt(n.getItem(k+"time"),10)||0;return(new Date).getTime()-a>m.autosave_retention?(d(!1),!1):!0}function d(b){n.removeItem(k+"draft"),n.removeItem(k+"time"),b!==!1&&a.fire("RemoveDraft")}function e(){!j()&&a.isDirty()&&(n.setItem(k+"draft",a.getContent({format:"raw",no_events:!0})),n.setItem(k+"time",(new Date).getTime()),a.fire("StoreDraft"))}function f(){c()&&(a.setContent(n.getItem(k+"draft"),{format:"raw"}),a.fire("RestoreDraft"))}function g(){l||(setInterval(function(){a.removed||e()},m.autosave_interval),l=!0)}function h(){var b=this;b.disabled(!c()),a.on("StoreDraft RestoreDraft RemoveDraft",function(){b.disabled(!c())}),g()}function i(){a.undoManager.beforeChange(),f(),d(),a.undoManager.add()}function j(b){var c=a.settings.forced_root_block;return b=tinymce.trim("undefined"==typeof b?a.getBody().innerHTML:b),""===b||new RegExp("^<"+c+"[^>]*>((\xa0|&nbsp;|[ ]|<br[^>]*>)+?|)</"+c+">|<br>$","i").test(b)}var k,l,m=a.settings,n=tinymce.util.LocalStorage;k=m.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",k=k.replace(/\{path\}/g,document.location.pathname),k=k.replace(/\{query\}/g,document.location.search),k=k.replace(/\{id\}/g,a.id),m.autosave_interval=b(m.autosave_interval,"30s"),m.autosave_retention=b(m.autosave_retention,"20m"),a.addButton("restoredraft",{title:"Restore last draft",onclick:i,onPostRender:h}),a.addMenuItem("restoredraft",{text:"Restore last draft",onclick:i,onPostRender:h,context:"file"}),a.settings.autosave_restore_when_empty!==!1&&(a.on("init",function(){c()&&j()&&f()}),a.on("saveContent",function(){d()})),window.onbeforeunload=tinymce._beforeUnloadHandler,this.hasDraft=c,this.storeDraft=e,this.restoreDraft=f,this.removeDraft=d,this.isEmpty=j}); \ No newline at end of file