Conversation
duzun
requested changes
Dec 14, 2023
| background-color: #fff; | ||
| } | ||
|
|
||
Owner
There was a problem hiding this comment.
Are you using an EditorConfig plugin in your IDE?
examples/playground.php
Outdated
| $url = @$_POST['url'] ?: @$_GET['url']; | ||
| $sel = @$_POST['sel'] ?: @$_GET['sel']; | ||
| $go = @$_POST['go'] ?: @$_GET['go']; | ||
| $ch = @$_POST['ch'] ?: @$_GET['ch']; |
Owner
There was a problem hiding this comment.
$_GET['ch'] allow to save the state in the URL and preserve it during refreshes. Maybe not a big deal for the cache expires, but I'd prefer to have consistency over all variables.
Owner
There was a problem hiding this comment.
Eg. http://localhost:8074/playground.php?url=http://duzun.me&sel=a%20img:parent&ch=10.
| <p><label>URL: <input type="url" name="url" value="<?=htmlspecialchars(@$url??'', ENT_QUOTES);?>" placeholder="e.g. https://mariauzun.com/portfolio" autofocus class="form-control" required /></label></p> | ||
| <p><label>Selector: <input type="text" name="sel" value="<?=htmlspecialchars(@$sel??'', ENT_QUOTES);?>" placeholder="e.g. 'a[href] > img[src]:parent'" class="form-control" required /></label></p> | ||
| <p><label>Cache: <input type="number" name="ch" value="<?=$_POST['ch']>=0?@$_POST['ch']:1800;?>" min="0" max="3600" placeholder="e.g. 1800" class="form-control" /> (seconds)</label></p> | ||
| <p><label>Cache: <input type="number" name="ch" value="<?=$_POST['ch']==='0'||(int)$_POST['ch']>0?@$_POST['ch']:'';?>" min="0" max="3600" placeholder="e.g. 600" class="form-control" /> (seconds) <code>default: 3600</code></label></p> |
Owner
There was a problem hiding this comment.
This line repeats the logic for ch.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
max-width:300px;0