Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR centralizes page-specific script injection by adding a Blade scripts stack in the main layout, and refactors multiple ad-related Blade partials/pages to push their scripts into that stack (plus a small accessibility improvement in the game view).
Changes:
- Add
@stack('scripts')tolayouts/app.blade.phpso views/partials can use@push('scripts'). - Move several ad script blocks (Google GPT / OneAD / Adsense loader) into the
scriptsstack and adjust their loading behavior. - Update game element preview image
altbindings to use the element title.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/views/layouts/app.blade.php | Adds @stack('scripts') near </body> to support stacked script injection. |
| resources/views/home.blade.php | Pushes Google GPT setup and ad-slot display scripts into the scripts stack. |
| resources/views/game/show.blade.php | Improves image accessibility by binding alt to element titles. |
| resources/views/game/rank.blade.php | Adds GPT anchor ad setup to the rank page header. |
| resources/views/ads/script_load_ad.blade.php | Pushes Adsense loader script into the scripts stack and wraps with DOMContentLoaded. |
| resources/views/ads/rank_onead_2.blade.php | Refactors OneAD script loading into stacked scripts and dynamic script insertion. |
| resources/views/ads/rank_onead_1.blade.php | Refactors OneAD script loading into stacked scripts and dynamic script insertion. |
| resources/views/ads/onead_text.blade.php | Refactors OneAD text-drive script loading into stacked scripts and dynamic script insertion. |
| resources/views/ads/home_onead_2_pc.blade.php | Refactors OneAD native-drive script loading into stacked scripts and dynamic script insertion. |
| resources/views/ads/home_onead_1_pc.blade.php | Refactors OneAD fullscreen script loading into stacked scripts and dynamic script insertion. |
| resources/views/ads/game_onead_1_pc.blade.php | Refactors OneAD script loading into stacked scripts (but currently has a broken Blade directive). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.