Skip to content

Commit

Permalink
fix: remove toggles from settings page (#27)
Browse files Browse the repository at this point in the history
* fix: add plugin metrics ua to query

* fix: remove toggles from settings page

* fix: phpstan action
  • Loading branch information
dkaser authored Nov 13, 2024
1 parent 099b190 commit 3c02a77
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
- uses: actions/checkout@v4
- uses: php-actions/composer@v6
- uses: php-actions/phpstan@v3
with:
version: composer

commitlint:
name: Commitlint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ function requestErase(e) {

if ($.cookie('tailscale_view_mode') == 'advanced') {
$('.advanced').show();
$('.basic').hide();
}

$('.advancedview').switchButton({
Expand All @@ -205,8 +204,11 @@ function requestErase(e) {
checked: $.cookie('tailscale_view_mode') == 'advanced'
});
$('.advancedview').change(function(){
$('.advanced').toggle('slow');
$('.basic').toggle('slow');
if($('.advancedview').is(':checked')) {
$('.advanced').show('slow');
} else {
$('.advanced').hide('slow');
}
$.cookie('tailscale_view_mode', $('.advancedview').is(':checked') ? 'advanced' : 'basic', {expires:3650});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public static function download_url(string $url): string
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_REFERER, "");
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'plugin-metrics/1.0.0');
$out = curl_exec($ch) ?: false;
curl_close($ch);
return strval($out);
Expand Down

0 comments on commit 3c02a77

Please sign in to comment.