-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82a7d01
commit 4e793c1
Showing
3 changed files
with
0 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +0,0 @@ | ||
declare global { | ||
interface Window { | ||
interval: NodeJS.Timer; | ||
timeout: NodeJS.Timeout; | ||
} | ||
} | ||
|
||
const refresh = async () => { | ||
clearInterval(window.interval); | ||
|
||
window.interval = setInterval(async () => { | ||
clearTimeout(window.timeout); | ||
|
||
window.timeout = setTimeout( | ||
async () => | ||
( | ||
await getElement( | ||
'[data-testid="aircraft-panel__header"] button.rounded-md', | ||
) | ||
).forEach((el) => el.click()), | ||
25000, | ||
); | ||
|
||
const Focus = await getElement( | ||
'[data-testid="most-tracked-flights-widget"] [data-testid="list-wrapper"] > div', | ||
); | ||
|
||
const Identifier = Math.floor(Math.random() * Focus.length); | ||
|
||
(await getElement('[data-testid="map-controls__zoom-in"]')).forEach( | ||
(el) => | ||
setTimeout(() => { | ||
el?.click(); | ||
|
||
setTimeout(() => el?.click(), 1000); | ||
}, 1000), | ||
); | ||
|
||
Focus.item(Identifier)?.click(); | ||
|
||
( | ||
await getElement( | ||
'.ui-icon.ui-icon-closethick,[data-testid="aircraft__not-live-flight"] [data-testid="base-button"]', | ||
) | ||
).forEach((el) => { | ||
el?.click(); | ||
}); | ||
|
||
setTimeout(async () => { | ||
( | ||
await getElement( | ||
'[data-testid="aircraft__follow-flight-button"]:not(.text-yellow-500)', | ||
) | ||
) | ||
.item(0) | ||
?.click(); | ||
|
||
( | ||
await getElement( | ||
'[data-testid="aircraft-panel__more__hide-not-selected-btn"] [aria-checked="false"]', | ||
) | ||
).forEach((el) => el?.parentElement?.click()); | ||
}, 3000); | ||
|
||
( | ||
await getElement(".overlay-views-panel,.section.search-overlay") | ||
).forEach((el) => el.remove()); | ||
}, 30000); | ||
}; | ||
|
||
await refresh(); | ||
|
||
export const { | ||
default: { getElement }, | ||
} = await import("../Library/DOM.js"); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +0,0 @@ | ||
declare global { | ||
interface Window { | ||
interval: NodeJS.Timer; | ||
} | ||
} | ||
|
||
const refresh = async () => { | ||
clearInterval(window.interval); | ||
|
||
window.interval = setInterval(async () => { | ||
clearInterval(window.interval); | ||
|
||
(await getElement(".js-column")).forEach(async (el) => { | ||
const focus = await getElement(".js-stream-item", el); | ||
|
||
const length = focus.length; | ||
|
||
const id = Math.floor(Math.random() * length); | ||
|
||
if ( | ||
(await getElement(".btd-content-warning", focus.item(id))) | ||
.length === 0 | ||
) { | ||
( | ||
await getElement(".js-stream-item-content", focus.item(id)) | ||
).forEach((el) => el?.click()); | ||
} | ||
|
||
setTimeout( | ||
async () => { | ||
const focus = await getElement(".js-column-back"); | ||
|
||
focus.forEach((el) => { | ||
el?.click(); | ||
}); | ||
|
||
await refresh(); | ||
}, | ||
24000 + Math.floor(Math.random() * length * 1000), | ||
); | ||
|
||
setTimeout( | ||
async () => { | ||
const focus = await getElement(".column-type-icon"); | ||
|
||
focus.forEach((el) => { | ||
el?.click(); | ||
}); | ||
|
||
await refresh(); | ||
}, | ||
24000 + Math.floor(Math.random() * length * 1000), | ||
); | ||
}); | ||
}, 30000); | ||
}; | ||
|
||
setInterval( | ||
async () => | ||
(await getElement(".btd-clear-column-link")).forEach((el) => { | ||
el?.click(); | ||
}), | ||
55000, | ||
); | ||
|
||
setInterval(async () => { | ||
const translations = await getElement(".js-translate-call-to-action"); | ||
|
||
let index = 0; | ||
|
||
translations.forEach((el) => { | ||
if (index <= 5) { | ||
el?.click(); | ||
index++; | ||
} | ||
}); | ||
|
||
setTimeout( | ||
async () => | ||
( | ||
await getElement( | ||
".js-tweet-detail.tweet-detail-wrapper .js-tweet-translation-text.tweet-translation-text", | ||
) | ||
).forEach((el) => { | ||
const position = el.getBoundingClientRect(); | ||
|
||
if ( | ||
position.top >= 0 && | ||
position.bottom <= window.innerHeight | ||
) { | ||
el.scrollIntoView(); | ||
} | ||
}), | ||
3000, | ||
); | ||
}, 15000); | ||
|
||
await refresh(); | ||
|
||
export const { | ||
default: { getElement }, | ||
} = await import("../Library/DOM.js"); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters