mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-29 11:34:13 +02:00
Fix JSDoc issues
This commit is contained in:
parent
3939c2263a
commit
4751a948e7
Resources/Content
@ -136,7 +136,7 @@ if (!("TD" in window)) {
|
|||||||
* @property {Class} TwitterActionRetweetedInteraction
|
* @property {Class} TwitterActionRetweetedInteraction
|
||||||
* @property {Class<TwitterClient>} TwitterClient
|
* @property {Class<TwitterClient>} TwitterClient
|
||||||
* @property {Class<TwitterConversation>} TwitterConversation
|
* @property {Class<TwitterConversation>} TwitterConversation
|
||||||
* @property {Class} TwitterConversationMessageEvent
|
* @property {Class<TwitterConversationMessageEvent>} TwitterConversationMessageEvent
|
||||||
* @property {TwitterMedia_Class} TwitterMedia
|
* @property {TwitterMedia_Class} TwitterMedia
|
||||||
* @property {Class<TwitterStatus>} TwitterStatus
|
* @property {Class<TwitterStatus>} TwitterStatus
|
||||||
* @property {Class<TwitterUser>} TwitterUser
|
* @property {Class<TwitterUser>} TwitterUser
|
||||||
@ -225,13 +225,20 @@ if (!("TD" in window)) {
|
|||||||
* @typedef ChirpRenderSettings
|
* @typedef ChirpRenderSettings
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
*
|
*
|
||||||
* @property {boolean} withFooter
|
* @property {boolean} [isFavorite}
|
||||||
* @property {boolean} withTweetActions
|
* @property {boolean} [isInConvo}
|
||||||
* @property {boolean} isInConvo
|
* @property {boolean} [isMediaPreviewCompact}
|
||||||
* @property {boolean} isFavorite
|
* @property {boolean} [isMediaPreviewInQuoted}
|
||||||
* @property {boolean} isRetweeted
|
* @property {boolean} [isMediaPreviewLarge}
|
||||||
* @property {boolean} isPossiblySensitive
|
* @property {boolean} [isMediaPreviewOff}
|
||||||
* @property {string} mediaPreviewSize
|
* @property {boolean} [isMediaPreviewSmall}
|
||||||
|
* @property {boolean} [isPossiblySensitive}
|
||||||
|
* @property {boolean} [isRetweeted}
|
||||||
|
* @property {string} [mediaPreviewSize}
|
||||||
|
* @property {string} [thumbSizeClass}
|
||||||
|
* @property {boolean} [withFooter}
|
||||||
|
* @property {boolean} [withMediaPreview}
|
||||||
|
* @property {boolean} [withTweetActions}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -273,6 +280,7 @@ if (!("TD" in window)) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef TwitterConversation
|
* @typedef TwitterConversation
|
||||||
|
* @extends ChirpBase
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
*
|
*
|
||||||
* @property {function} markAsRead
|
* @property {function} markAsRead
|
||||||
|
@ -34,4 +34,4 @@
|
|||||||
|
|
||||||
onNextFrame();
|
onNextFrame();
|
||||||
});
|
});
|
||||||
})(/** @type TD_Screenshot_Bridge */ $TD_NotificationScreenshot);
|
})(/** @type {TD_Screenshot_Bridge} */ $TD_NotificationScreenshot);
|
||||||
|
@ -49,7 +49,7 @@ export function loadConfigurationFile(pluginObject, fileNameUser, fileNameDefaul
|
|||||||
const token = pluginObject.$token;
|
const token = pluginObject.$token;
|
||||||
|
|
||||||
$TDP.checkFileExists(token, fileNameUser).then(exists => {
|
$TDP.checkFileExists(token, fileNameUser).then(exists => {
|
||||||
/** @type string|null */
|
/** @type {string|null} */
|
||||||
const fileName = exists ? fileNameUser : fileNameDefault;
|
const fileName = exists ? fileNameUser : fileNameDefault;
|
||||||
|
|
||||||
if (fileName === null) {
|
if (fileName === null) {
|
||||||
|
@ -19,10 +19,16 @@ export default function() {
|
|||||||
ensurePropertyExists(TD, "controller", "columnManager", "_columnOrder");
|
ensurePropertyExists(TD, "controller", "columnManager", "_columnOrder");
|
||||||
ensurePropertyExists(TD, "controller", "columnManager", "move");
|
ensurePropertyExists(TD, "controller", "columnManager", "move");
|
||||||
|
|
||||||
$(document).on("uiSearchNoTemporaryColumn", function(e, /** @type SearchEventData */ data) {
|
/**
|
||||||
|
* @param e
|
||||||
|
* @param {SearchEventData} data
|
||||||
|
*/
|
||||||
|
const onSearch = function(e, data) {
|
||||||
if (data.query && data.searchScope !== "users" && !data.columnKey && !("tduckResetInput" in data)) {
|
if (data.query && data.searchScope !== "users" && !data.columnKey && !("tduckResetInput" in data)) {
|
||||||
$(".js-app-search-input").val("");
|
$(".js-app-search-input").val("");
|
||||||
$(".js-perform-search").blur();
|
$(".js-perform-search").blur();
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
$(document).on("uiSearchNoTemporaryColumn", onSearch);
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,7 @@ import { ensurePropertyExists } from "../api/utils.js";
|
|||||||
export default function() {
|
export default function() {
|
||||||
ensurePropertyExists($, "tools", "dateinput", "conf", "firstDay");
|
ensurePropertyExists($, "tools", "dateinput", "conf", "firstDay");
|
||||||
|
|
||||||
/** @type DateInput */
|
/** @type {DateInput} */
|
||||||
const dateinput = $["tools"]["dateinput"];
|
const dateinput = $["tools"]["dateinput"];
|
||||||
|
|
||||||
onAppReady(function setupDatePickerFirstDayCallback() {
|
onAppReady(function setupDatePickerFirstDayCallback() {
|
||||||
|
@ -16,7 +16,13 @@ export default function() {
|
|||||||
ensurePropertyExists(TD, "controller", "clients", "getClient");
|
ensurePropertyExists(TD, "controller", "clients", "getClient");
|
||||||
ensurePropertyExists(TD, "services", "Conversations", "prototype", "getConversation");
|
ensurePropertyExists(TD, "services", "Conversations", "prototype", "getConversation");
|
||||||
|
|
||||||
$(document).on("dataDmSent", function(e, /** @type DmSentEventData */ data) {
|
/**
|
||||||
|
* @param e
|
||||||
|
* @param {DmSentEventData} data
|
||||||
|
*/
|
||||||
|
const onDataDmSent = function(e, data) {
|
||||||
TD.controller.clients.getClient(data.request.accountKey)?.conversations.getConversation(data.request.conversationId)?.markAsRead();
|
TD.controller.clients.getClient(data.request.accountKey)?.conversations.getConversation(data.request.conversationId)?.markAsRead();
|
||||||
});
|
};
|
||||||
|
|
||||||
|
$(document).on("dataDmSent", onDataDmSent);
|
||||||
};
|
};
|
||||||
|
@ -20,7 +20,11 @@ export default function() {
|
|||||||
ensurePropertyExists(TD, "controller", "columnManager", "_columnOrder");
|
ensurePropertyExists(TD, "controller", "columnManager", "_columnOrder");
|
||||||
ensurePropertyExists(TD, "controller", "columnManager", "move");
|
ensurePropertyExists(TD, "controller", "columnManager", "move");
|
||||||
|
|
||||||
$(document).on("uiSearchNoTemporaryColumn", function(e, /** @type SearchEventData */ data) {
|
/**
|
||||||
|
* @param e
|
||||||
|
* @param {SearchEventData} data
|
||||||
|
*/
|
||||||
|
const onSearch = function(e, data) {
|
||||||
if (data.query && data.searchScope !== "users" && !data.columnKey && $TDX.openSearchInFirstColumn) {
|
if (data.query && data.searchScope !== "users" && !data.columnKey && $TDX.openSearchInFirstColumn) {
|
||||||
const order = TD.controller.columnManager._columnOrder;
|
const order = TD.controller.columnManager._columnOrder;
|
||||||
|
|
||||||
@ -32,5 +36,7 @@ export default function() {
|
|||||||
TD.controller.columnManager.move(columnKey, "left");
|
TD.controller.columnManager.move(columnKey, "left");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
$(document).on("uiSearchNoTemporaryColumn", onSearch);
|
||||||
};
|
};
|
||||||
|
@ -4,7 +4,11 @@ import { $ } from "../api/jquery.js";
|
|||||||
* Creates a `tduckOldComposerActive` event on the `document` object, which triggers when the composer is activated.
|
* Creates a `tduckOldComposerActive` event on the `document` object, which triggers when the composer is activated.
|
||||||
*/
|
*/
|
||||||
export default function() {
|
export default function() {
|
||||||
$(document).on("uiDrawerActive uiRwebComposerOptOut", function(e, /** @type {{ activeDrawer: string }} */ data) {
|
/**
|
||||||
|
* @param e
|
||||||
|
* @param {{ activeDrawer: string }} data
|
||||||
|
*/
|
||||||
|
const onDrawerEvent = function(e, data) {
|
||||||
if (e.type === "uiDrawerActive" && data.activeDrawer !== "compose") {
|
if (e.type === "uiDrawerActive" && data.activeDrawer !== "compose") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -12,5 +16,7 @@ export default function() {
|
|||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$(document).trigger("tduckOldComposerActive");
|
$(document).trigger("tduckOldComposerActive");
|
||||||
}, 0);
|
}, 0);
|
||||||
});
|
};
|
||||||
|
|
||||||
|
$(document).on("uiDrawerActive uiRwebComposerOptOut", onDrawerEvent);
|
||||||
};
|
};
|
||||||
|
@ -12,7 +12,7 @@ export default function() {
|
|||||||
|
|
||||||
if (checkPropertyExists(TD, "services", "TwitterUser", "prototype")) {
|
if (checkPropertyExists(TD, "services", "TwitterUser", "prototype")) {
|
||||||
replaceFunction(TD.services.TwitterUser.prototype, "fromJSONObject", function(func, args) {
|
replaceFunction(TD.services.TwitterUser.prototype, "fromJSONObject", function(func, args) {
|
||||||
/** @type TwitterUser */
|
/** @type {TwitterUser} */
|
||||||
const user = func.apply(this, args);
|
const user = func.apply(this, args);
|
||||||
|
|
||||||
if (user.id === accountId) {
|
if (user.id === accountId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user