1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-02-10 12:10:21 +00:00
Files
TiddlyWiki5/plugins/tiddlywiki/twitter-archivist/startup.js
Mario Pietsch 8aa558eb2c Remove module function wrapper and add matching configurations for dprint and eslint (#7596)
* remove blks first try

* dprint.json seems to be OK, some forgotten functions

* add some more space-after-keyword settings

* server remove blks

* add **/files to dprint exclude

* dprint.js fixes a typo

* add boot.js and bootprefix.js to dprint exclude

* dprint change dprint.json

* add dprint fmt as script

* remove jslint comments

* fix whitespace

* fix whitespace

* remove function-wrapper from geospatial plugin

* fix whitespace

* add function wrapper to dyannotate-startup

* remove dpring.json
2025-03-21 17:22:57 +00:00

34 lines
765 B
JavaScript

/*\
title: $:/plugins/tiddlywiki/twitter-archivist/startup.js
type: application/javascript
module-type: startup
Twitter initialisation
\*/
"use strict";
// Export name and synchronous status
exports.name = "twitter-archivist";
exports.after = ["startup"];
exports.synchronous = true;
exports.startup = function() {
$tw.rootWidget.addEventListener("tm-load-twitter-archive",function(event) {
// Load tweets
var archiveSource = new $tw.utils.TwitterArchivistSourceBrowser({
}),
archivist = new $tw.utils.TwitterArchivist({
source: archiveSource
});
archivist.loadArchive({
wiki: $tw.wiki
}).then(function() {
alert("Archived tweets imported");
}).catch(function(err) {
alert("Error importing archived tweets: " + err);
});
});
};