1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00

Twitter Plugin: Add warning if the wiki needs to be saved and reloaded

This commit is contained in:
jeremy@jermolene.com 2020-04-21 21:22:13 +01:00
parent d6ee700bca
commit 3a20fb1e3a

View File

@ -0,0 +1,27 @@
/*\
title: $:/plugins/tiddlywiki/twitter/startup.js
type: application/javascript
module-type: startup
Twitter initialisation
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
exports.name = "twitter";
exports.before = ["startup"];
exports.synchronous = true;
exports.startup = function() {
var logger = new $tw.utils.Logger("twitter-plugin");
if($tw.browser && !window.twttr) {
logger.alert("The plugin 'tiddlywiki/twitter' is disabled until this wiki is saved and reloaded again");
}
};
})();