Skip to content

Commit

Permalink
controls using cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
pablouser1 committed Aug 21, 2024
1 parent 9ac169d commit 9840554
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/Helpers/Misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ public static function getView(string $template): string {
}

public static function getScraperOptions(): array {
$debug = self::env('APP_DEBUG', false);
$url = self::env('API_CHROMEDRIVER', 'http://localhost:4444');
$verifyFp = self::env('API_VERIFYFP', '');
$device_id = self::env('API_DEVICE_ID', '');
$ua = self::env('USER_AGENT', '');

$options = [
'debug' => $debug,
'browser' => [
'url' => $url,
'close_when_done' => false
Expand Down
2 changes: 1 addition & 1 deletion templates/components/themes/common/controls.latte
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
{if isset($_GET['cursor']) && is_numeric($_GET['cursor']) && $_GET['cursor'] != 0}
<a class="button is-danger" href="?cursor=0">First</a>
{/if}
<a n:attr="disabled => !$feed->hasMore" class="button is-success" href="?cursor={$feed->maxCursor}">Next</a>
<a n:attr="disabled => !$feed->hasMore" class="button is-success" href="?cursor={$feed->cursor}">Next</a>
</div>

0 comments on commit 9840554

Please # to comment.