Apply suggestions from code review in #104

Co-authored-by: rugk <rugk+git@posteo.de>
This commit is contained in:
Austin Huang 2023-03-19 14:55:50 +00:00 committed by GitHub
parent 4a82fe0348
commit 8e330e395f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,8 +101,6 @@ async function injectInteractionButtons() {
} catch (error) { } catch (error) {
// Interaction buttons failed to appear // Interaction buttons failed to appear
} }
} }
/** /**
@ -120,9 +118,9 @@ function initInjections() {
* @returns {void} * @returns {void}
*/ */
async function init() { async function init() {
if (typeof MISSKEY_INJECTED_CLASS === "undefined"){ if (typeof MISSKEY_INJECTED === "undefined"){
// eslint-disable-next-line vars-on-top, no-var // eslint-disable-next-line vars-on-top, no-var
var MISSKEY_INJECTED_CLASS = true; var MISSKEY_INJECTED = true;
} else { } else {
// init has already run // init has already run
return; return;
@ -134,7 +132,7 @@ async function init() {
initInjections(); initInjections();
}); });
// monitor only the main column in the Mastodon UI // monitor only the main column in the Misskey UI
const mainColumn = await waitForElement( const mainColumn = await waitForElement(
".mk-app > .main", ".mk-app > .main",
false, false,