mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-03-25 00:02:19 -07:00
* fix: apply automatic eslint fixes * lint: allow hashbang comment for tiddlywiki.js * lint: first back of manual lint fixes for unused vars * lint: added more fixes for unused vars * lint: missed files * lint: updated eslint config with selected rules from #9669
33 lines
769 B
JavaScript
33 lines
769 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);
|
|
});
|
|
});
|
|
};
|