1
Fork 1
mirror of https://git.lolcat.ca/lolcat/4get.git synced 2024-11-08 17:43:07 -05:00
Commit graph

3 commits

Author SHA1 Message Date
cynic
24cfc5136e some misc. oracles stuff (fixes/features) (#15)
fix a small calc.php bug, and add date information to the time module. the changes have been sitting on a branch for like a week, so I figured I'd cherry-pick them over to this branch for a PR.
[as always, these changes are live on my instance.](https://4get.silly.computer/web?s=what+is+the+date&scraper=yandex&nsfw=yes)

Reviewed-on: https://git.lolcat.ca/lolcat/4get/pulls/15
Co-authored-by: cynic <admin@cynic.moe>
Co-committed-by: cynic <admin@cynic.moe>
2023-09-22 21:44:33 -05:00
cynic
be8546bdf5 make 'oracles' feature backwards compatible with php 7.4 (#13)
adds implementations of `str_contains` and `str_starts_with` that are used if the functions are not already defined. this should enable 4get to work on both php 7.4 and php 8.*

my instance is currently on 7.4.33, and you can see the oracles working here:
[calc.php](https://4get.silly.computer/web?s=2%2B4*(2^2))
[encoder.php](https://4get.silly.computer/web?s=md5+hamburger)
[numerics.php](https://4get.silly.computer/web?s=0xf0f0f)
[time.php](https://4get.silly.computer/web?s=what+is+the+time+right+now+tz%253Aest)

Reviewed-on: https://git.lolcat.ca/lolcat/4get/pulls/13
Co-authored-by: cynic <admin@cynic.moe>
Co-committed-by: cynic <admin@cynic.moe>
2023-09-14 19:10:13 -05:00
cynic
8762d68466 add structure for `Oracles' (special answers depending on queries + a few implementations (#10)
incl. a calculator, a hash encoder + rot13 and b64!, and a "what time is it" with timezone selection

frontend injected in $payload["left"] in web.php

you can see this live [on my instance](https://4get.silly.computer/web?s=7%2B8(9%5E2)&scraper=brave&nsfw=yes) (there are some issues that aren't related to this PR. favicons, etc. I'll fix them later.)

Reviewed-on: https://git.lolcat.ca/lolcat/4get/pulls/10
Co-authored-by: cynic <admin@cynic.moe>
Co-committed-by: cynic <admin@cynic.moe>
2023-09-13 22:24:02 -05:00