Format code with prettier
This commit fixes the style issues introduced in 5293ae3
according to the output
from prettier.
Details: https://deepsource.io/gh/MillenniumEarl/F95API/transform/266ac9b1-e124-46f9-907f-e66bdcdc002c/
pull/33/head
parent
5293ae3f1b
commit
6487a5946b
|
@ -552,10 +552,10 @@ async function getUserWatchedGameThreads(browser) {
|
||||||
|
|
||||||
// Show the popup
|
// Show the popup
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
page.click(selectors.WATCHED_THREAD_FILTER_POPUP_BUTTON),
|
page.click(selectors.WATCHED_THREAD_FILTER_POPUP_BUTTON),
|
||||||
page.waitForSelector(selectors.UNREAD_THREAD_CHECKBOX),
|
page.waitForSelector(selectors.UNREAD_THREAD_CHECKBOX),
|
||||||
page.waitForSelector(selectors.ONLY_GAMES_THREAD_OPTION),
|
page.waitForSelector(selectors.ONLY_GAMES_THREAD_OPTION),
|
||||||
page.waitForSelector(selectors.FILTER_THREADS_BUTTON),
|
page.waitForSelector(selectors.FILTER_THREADS_BUTTON),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Set the filters
|
// Set the filters
|
||||||
|
|
|
@ -24,7 +24,8 @@ module.exports.getGameInfo = async function (browser, url) {
|
||||||
if (shared.debug) console.log("Obtaining game info");
|
if (shared.debug) console.log("Obtaining game info");
|
||||||
|
|
||||||
// Verify the correctness of the URL
|
// Verify the correctness of the URL
|
||||||
if (!urlsHelper.isF95URL(url)) throw new Error(url + " is not a valid F95Zone URL");
|
if (!urlsHelper.isF95URL(url))
|
||||||
|
throw new Error(url + " is not a valid F95Zone URL");
|
||||||
const exists = await urlsHelper.urlExists(url);
|
const exists = await urlsHelper.urlExists(url);
|
||||||
if (!exists) return null;
|
if (!exists) return null;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ module.exports.getSearchGameResults = async function (browser, gamename) {
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
page.waitForSelector(selectors.SEARCH_FORM_TEXTBOX),
|
page.waitForSelector(selectors.SEARCH_FORM_TEXTBOX),
|
||||||
page.waitForSelector(selectors.TITLE_ONLY_CHECKBOX),
|
page.waitForSelector(selectors.TITLE_ONLY_CHECKBOX),
|
||||||
page.waitForSelector(selectors.SEARCH_BUTTON)
|
page.waitForSelector(selectors.SEARCH_BUTTON),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
await page.type(selectors.SEARCH_FORM_TEXTBOX, gamename); // Type the game we desire
|
await page.type(selectors.SEARCH_FORM_TEXTBOX, gamename); // Type the game we desire
|
||||||
|
|
|
@ -66,7 +66,7 @@ module.exports.urlExists = async function (url, checkRedirect) {
|
||||||
* @param {String} url URL to check for redirect
|
* @param {String} url URL to check for redirect
|
||||||
* @returns {Promise<String>} Redirect URL or the passed URL
|
* @returns {Promise<String>} Redirect URL or the passed URL
|
||||||
*/
|
*/
|
||||||
module.exports.getUrlRedirect = async function(url) {
|
module.exports.getUrlRedirect = async function (url) {
|
||||||
const response = await ky.head(url);
|
const response = await ky.head(url);
|
||||||
return response.url;
|
return response.url;
|
||||||
}
|
};
|
||||||
|
|
Loading…
Reference in New Issue