From 8a082df36e558c2c8ac970a5201029764b815631 Mon Sep 17 00:00:00 2001 From: bill Date: Sat, 7 Feb 2026 14:42:55 +0800 Subject: [PATCH 1/6] fix: update alt attributes for images to use element titles --- resources/views/game/show.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/game/show.blade.php b/resources/views/game/show.blade.php index e9bec38..5ca02d6 100644 --- a/resources/views/game/show.blade.php +++ b/resources/views/game/show.blade.php @@ -886,7 +886,7 @@ class="btn btn-outline-dark ml-1 white-space-no-wrap black-box-toggle"
Element 1 + :src="post.element1.url" :alt="post.element1.title">
@@ -905,7 +905,7 @@ class="btn btn-outline-dark ml-1 white-space-no-wrap black-box-toggle"
Element 2 + :src="post.element2.url" :alt="post.element2.title">
From 79375fa901e510978b8ae359c0bf28df9e3c11a3 Mon Sep 17 00:00:00 2001 From: bill Date: Sat, 14 Feb 2026 14:55:25 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=BB=A3=E5=91=8A=E7=89=88=E4=BD=8D?= =?UTF-8?q?=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/ads/game_onead_1_pc.blade.php | 46 +++++++++-------- resources/views/ads/home_onead_1_pc.blade.php | 47 ++++++++++-------- resources/views/ads/home_onead_2_pc.blade.php | 43 +++++++++------- resources/views/ads/onead_text.blade.php | 37 ++++++++------ resources/views/ads/rank_onead_1.blade.php | 14 ++++-- resources/views/ads/rank_onead_2.blade.php | 49 +++++++++++-------- resources/views/ads/script_load_ad.blade.php | 6 ++- resources/views/game/rank.blade.php | 11 +++++ resources/views/home.blade.php | 4 ++ resources/views/layouts/app.blade.php | 1 + 10 files changed, 159 insertions(+), 99 deletions(-) diff --git a/resources/views/ads/game_onead_1_pc.blade.php b/resources/views/ads/game_onead_1_pc.blade.php index 1b22b26..28be8e9 100644 --- a/resources/views/ads/game_onead_1_pc.blade.php +++ b/resources/views/ads/game_onead_1_pc.blade.php @@ -1,27 +1,33 @@ @if(!is_skip_ad())
+@push('scripts') + ONEAD_TEXT = {}; + ONEAD_TEXT.pub = {}; + ONEAD_TEXT.pub.uid = 2000374; //媒體 uid + ONEAD_TEXT.pub.player_mode_div = "div-onead-ad"; + ONEAD_TEXT.pub.slotobj = document.getElementById("div-onead-nd-01"); + ONEAD_TEXT.pub.player_mode = "native-drive"; + ONEAD_TEXT.pub.max_threads = 3; + ONEAD_TEXT.pub.position_id = /Mobi|Android|iPhone|iPad|iPod/i.test(navigator.userAgent)? "5" : "0"; + ONEAD_TEXT.pub.mediaOption = { landingNewPage : true } + ONEAD_TEXT.pub.queryAdCallback = custom_call + window.ONEAD_text_pubs = window.ONEAD_text_pubs || []; + ONEAD_text_pubs.push(ONEAD_TEXT); - + var script = document.createElement('script'); + script.src = 'https://ad-specs.guoshipartners.com/static/js/ad-serv.min.js'; + document.body.appendChild(script); + }); + +@push('scripts') @endif diff --git a/resources/views/ads/home_onead_1_pc.blade.php b/resources/views/ads/home_onead_1_pc.blade.php index e776738..4ec9f07 100644 --- a/resources/views/ads/home_onead_1_pc.blade.php +++ b/resources/views/ads/home_onead_1_pc.blade.php @@ -1,26 +1,33 @@ @if(!is_skip_ad())
+@push('scripts') - +@endpush @endif diff --git a/resources/views/ads/home_onead_2_pc.blade.php b/resources/views/ads/home_onead_2_pc.blade.php index 1b0b8c1..f967b40 100644 --- a/resources/views/ads/home_onead_2_pc.blade.php +++ b/resources/views/ads/home_onead_2_pc.blade.php @@ -1,24 +1,31 @@ @if(!is_skip_ad())
+@push('scripts') - +@endpush @endif diff --git a/resources/views/ads/onead_text.blade.php b/resources/views/ads/onead_text.blade.php index e0f926d..1154ce0 100644 --- a/resources/views/ads/onead_text.blade.php +++ b/resources/views/ads/onead_text.blade.php @@ -1,21 +1,28 @@ @if(!is_skip_ad())
+@push('scripts') - +@endpush @endif diff --git a/resources/views/ads/rank_onead_1.blade.php b/resources/views/ads/rank_onead_1.blade.php index 1b22b26..1dbf206 100644 --- a/resources/views/ads/rank_onead_1.blade.php +++ b/resources/views/ads/rank_onead_1.blade.php @@ -1,6 +1,8 @@ @if(!is_skip_ad()) -
- - + var script = document.createElement('script'); + script.src = 'https://ad-specs.guoshipartners.com/static/js/ad-serv.min.js'; + document.body.appendChild(script); + }); + +@endpush @endif diff --git a/resources/views/ads/rank_onead_2.blade.php b/resources/views/ads/rank_onead_2.blade.php index e776738..aa5230a 100644 --- a/resources/views/ads/rank_onead_2.blade.php +++ b/resources/views/ads/rank_onead_2.blade.php @@ -1,26 +1,33 @@ @if(!is_skip_ad()) -
+
+@push('scripts') - +@endpush @endif diff --git a/resources/views/ads/script_load_ad.blade.php b/resources/views/ads/script_load_ad.blade.php index 36d6b67..737a7e4 100644 --- a/resources/views/ads/script_load_ad.blade.php +++ b/resources/views/ads/script_load_ad.blade.php @@ -1,5 +1,7 @@ @if (!is_skip_ad()) - +@endpush @endif diff --git a/resources/views/game/rank.blade.php b/resources/views/game/rank.blade.php index fd2b311..3eff441 100644 --- a/resources/views/game/rank.blade.php +++ b/resources/views/game/rank.blade.php @@ -9,6 +9,17 @@ @section('header') + + @endsection @section('content') diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 04a405f..1cb716c 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -6,6 +6,7 @@ @section('header') @if (config('services.google_ad.enabled') && config('services.google_ad.home_page') && !is_skip_ad()) {{-- Ads --}} + @push('scripts') + @endpush @endif @endsection @@ -428,11 +430,13 @@ {{-- google ads --}}
+ @push('scripts') + @endpush
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 5116f5d..52e1da2 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -176,6 +176,7 @@ class="rounded-circle" width="24" height="24" style="object-fit: cover" @yield('footer') + @stack('scripts') From 3a2c622ea44e9049fc982c451d998e10e5fc75e9 Mon Sep 17 00:00:00 2001 From: Bowei Zeng Date: Sat, 14 Feb 2026 16:29:29 +0800 Subject: [PATCH 3/6] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- resources/views/ads/game_onead_1_pc.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/ads/game_onead_1_pc.blade.php b/resources/views/ads/game_onead_1_pc.blade.php index 28be8e9..736aca6 100644 --- a/resources/views/ads/game_onead_1_pc.blade.php +++ b/resources/views/ads/game_onead_1_pc.blade.php @@ -29,5 +29,5 @@ document.body.appendChild(script); }); -@push('scripts') +@endpush @endif From 80e66360efd7dbd80a3c960c6a4c5c0910783fd7 Mon Sep 17 00:00:00 2001 From: bill Date: Sat, 14 Feb 2026 16:33:30 +0800 Subject: [PATCH 4/6] fix: ensure global access to ONEAD_pubs in ad scripts --- resources/views/ads/home_onead_1_pc.blade.php | 6 +++--- resources/views/ads/rank_onead_2.blade.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/views/ads/home_onead_1_pc.blade.php b/resources/views/ads/home_onead_1_pc.blade.php index 4ec9f07..e8ef960 100644 --- a/resources/views/ads/home_onead_1_pc.blade.php +++ b/resources/views/ads/home_onead_1_pc.blade.php @@ -21,9 +21,9 @@ _ONEAD.pub.google_view_click = "%%CLICK_URL_UNESC%%"; _ONEAD.pub.google_view_pixel = ""; _ONEAD.pub.queryAdCallback = custom_call - var ONEAD_pubs = ONEAD_pubs || []; - ONEAD_pubs.push(_ONEAD); - + window.ONEAD_pubs = window.ONEAD_pubs || []; + window.ONEAD_pubs.push(_ONEAD); + var script = document.createElement('script'); script.src = 'https://ad-specs.guoshipartners.com/static/js/onead-lib.min.js'; document.body.appendChild(script); diff --git a/resources/views/ads/rank_onead_2.blade.php b/resources/views/ads/rank_onead_2.blade.php index aa5230a..1cbe8f3 100644 --- a/resources/views/ads/rank_onead_2.blade.php +++ b/resources/views/ads/rank_onead_2.blade.php @@ -21,8 +21,8 @@ _ONEAD.pub.google_view_click = "%%CLICK_URL_UNESC%%"; _ONEAD.pub.google_view_pixel = ""; _ONEAD.pub.queryAdCallback = custom_call - var ONEAD_pubs = ONEAD_pubs || []; - ONEAD_pubs.push(_ONEAD); + window.ONEAD_pubs = ONEAD_pubs || []; + window.ONEAD_pubs.push(_ONEAD); var script = document.createElement('script'); script.src = 'https://ad-specs.guoshipartners.com/static/js/onead-lib.min.js'; From 924ace8e6e9254fc294728836c3231a35faed359 Mon Sep 17 00:00:00 2001 From: bill Date: Sat, 14 Feb 2026 16:40:21 +0800 Subject: [PATCH 5/6] fix: update video source URLs in ElementControllerTest and ElementSourceGuessTest --- tests/Unit/ElementControllerTest.php | 2 +- tests/Unit/ElementSourceGuessTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Unit/ElementControllerTest.php b/tests/Unit/ElementControllerTest.php index 111b8ff..e09d737 100644 --- a/tests/Unit/ElementControllerTest.php +++ b/tests/Unit/ElementControllerTest.php @@ -219,7 +219,7 @@ public function testUpdateElementVideo() $element = $this->createElements($post, 1)[0]; $this->be($post->user); // update video url - $url = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'; + $url = 'https://avtshare01.rz.tu-ilmenau.de/avt-vqdb-uhd-1/test_1/segments/bigbuck_bunny_8bit_15000kbps_1080p_60.0fps_h264.mp4'; $res = $this->put(route('api.element.update', $element->id), [ 'post_serial' => $post->serial, 'url' => $url, diff --git a/tests/Unit/ElementSourceGuessTest.php b/tests/Unit/ElementSourceGuessTest.php index 986d663..37b249f 100644 --- a/tests/Unit/ElementSourceGuessTest.php +++ b/tests/Unit/ElementSourceGuessTest.php @@ -65,7 +65,7 @@ public function testGuessImgurUrl() public function testGuessVideoUrl() { - $source = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'; + $source = 'https://avtshare01.rz.tu-ilmenau.de/avt-vqdb-uhd-1/test_1/segments/bigbuck_bunny_8bit_15000kbps_1080p_60.0fps_h264.mp4'; $guess = new ElementSourceGuess(); $guess->guess($source); $this->assertFalse($guess->isImage); From 1ae61d6d3c6c01fb114178c53de638fb73f0cb55 Mon Sep 17 00:00:00 2001 From: bill Date: Sat, 14 Feb 2026 17:01:30 +0800 Subject: [PATCH 6/6] fix: properly wrap Google Ads script inclusion in header section --- resources/views/game/rank.blade.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/views/game/rank.blade.php b/resources/views/game/rank.blade.php index 3eff441..39cfcc6 100644 --- a/resources/views/game/rank.blade.php +++ b/resources/views/game/rank.blade.php @@ -9,6 +9,7 @@ @section('header') + @if (config('services.google_ad.enabled') && config('services.google_ad.rank_page') && !is_skip_ad()) + @endif @endsection @section('content')