@@ -35,6 +35,88 @@ <h1>Xbox POST Error Codes</h1>
3535 Consider a < a href ="https://github.com/sponsors/tuxuser "> donation or sponsoring</ a > if you find this project useful!
3636 </ center >
3737 </ div >
38+ < div class ="info-text ">
39+ < center >
40+ Do you want to help grow this database?< br > < br > < button id ="submit-code-btn " class ="submit-code-btn "> Submit new error-code</ button >
41+ </ center >
42+ </ div >
43+
44+ <!-- Modal -->
45+ < div id ="submit-modal " class ="modal ">
46+ < div class ="modal-content ">
47+ < span class ="close-modal "> ×</ span >
48+ < h2 > Submit Error Code</ h2 >
49+ < form action ="https://nocodeform.io/f/6838a75640c263b75e9d8dff " method ="POST " class ="submit-form ">
50+ < div class ="form-group ">
51+ < input type ="email " placeholder ="Email " name ="email " required >
52+ </ div >
53+ < div class ="form-group ">
54+ < input type ="text " placeholder ="Error Code " name ="code " required >
55+ </ div >
56+ < div class ="form-group ">
57+ < select name ="console_type " required >
58+ < option value =""> Select Console Type</ option >
59+ < option value ="xbox_one_phat "> Xbox One Phat</ option >
60+ < option value ="xbox_one_s "> Xbox One S</ option >
61+ < option value ="xbox_one_x "> Xbox One X</ option >
62+ < option value ="series_s "> Xbox Series S</ option >
63+ < option value ="series_x "> Xbox Series X</ option >
64+ </ select >
65+ </ div >
66+ < div class ="form-group ">
67+ < select name ="code_type " required >
68+ < option value =""> Select Code Type</ option >
69+ < option value ="smc "> SMC</ option >
70+ < option value ="sp "> SP</ option >
71+ < option value ="cpu "> CPU</ option >
72+ < option value ="os "> OS</ option >
73+ </ select >
74+ </ div >
75+ < div class ="form-group radio-group ">
76+ < label > Is this an error?</ label >
77+ < div class ="radio-options ">
78+ < div >
79+ < input type ="radio " name ="is_error " value ="true " id ="error_yes " required >
80+ < label for ="error_yes "> Yes</ label >
81+ </ div >
82+ < div >
83+ < input type ="radio " name ="is_error " value ="false " id ="error_no ">
84+ < label for ="error_no "> No</ label >
85+ </ div >
86+ </ div >
87+ </ div >
88+ < div class ="form-group ">
89+ Please provide as many technical informations as possible.
90+ < ul >
91+ < li > Which components are involved?</ li >
92+ < li > Components to check / measure</ li >
93+ < li > etc.</ li >
94+ </ ul >
95+ < textarea name ="technical_infos " placeholder ="Technical information " required > </ textarea >
96+ </ div >
97+ < div class ="form-group radio-group ">
98+ < label > Was it fixed?</ label >
99+ < div class ="radio-options ">
100+ < div >
101+ < input type ="radio " name ="fixed " value ="yes " id ="fixed_yes " required >
102+ < label for ="fixed_yes "> Yes</ label >
103+ </ div >
104+ < div >
105+ < input type ="radio " name ="fixed " value ="no " id ="fixed_no ">
106+ < label for ="fixed_no "> No</ label >
107+ </ div >
108+ </ div >
109+ </ div >
110+ < div class ="form-group ">
111+ < textarea name ="message " placeholder ="Additional information "> </ textarea >
112+ </ div >
113+ < div class ="form-group ">
114+ < button type ="submit " class ="submit-button "> Submit Code</ button >
115+ </ div >
116+ </ form >
117+ </ div >
118+ </ div >
119+
38120 < div id ="loading " class ="loading "> Loading error codes...</ div >
39121 < div id ="error " class ="error " style ="display: none; "> </ div >
40122 < div id ="table-container " class ="table-container " style ="display: none; ">
@@ -91,6 +173,15 @@ <h1>Xbox POST Error Codes</h1>
91173 </ div >
92174 </ main >
93175
176+ <!-- Thank you popup -->
177+ < div id ="thanks-popup " class ="modal ">
178+ < div class ="modal-content thanks-content ">
179+ < span class ="close-modal "> ×</ span >
180+ < h2 > Thank You!</ h2 >
181+ < p > Thanks for submitting a new error code. We will review it and update the site.</ p >
182+ </ div >
183+ </ div >
184+
94185 < footer >
95186 < div class ="container ">
96187 < div class ="footer-content ">
@@ -109,6 +200,50 @@ <h1>Xbox POST Error Codes</h1>
109200 < script type ="module ">
110201 import { filters , setupFilters , updateActiveFilters , applyFilters } from './filters.js' ;
111202
203+ // Check for thanks parameter and show popup if present
204+ const urlParams = new URLSearchParams ( window . location . search ) ;
205+ if ( urlParams . has ( 'thanks' ) ) {
206+ const thanksPopup = document . getElementById ( 'thanks-popup' ) ;
207+ const closeThanks = thanksPopup . querySelector ( '.close-modal' ) ;
208+
209+ thanksPopup . style . display = "block" ;
210+
211+ closeThanks . onclick = function ( ) {
212+ thanksPopup . style . display = "none" ;
213+ // Remove the thanks parameter from URL without reloading
214+ const newUrl = window . location . pathname + window . location . search . replace ( / [ ? & ] t h a n k s / , '' ) ;
215+ window . history . replaceState ( { } , '' , newUrl ) ;
216+ }
217+
218+ window . onclick = function ( event ) {
219+ if ( event . target == thanksPopup ) {
220+ thanksPopup . style . display = "none" ;
221+ // Remove the thanks parameter from URL without reloading
222+ const newUrl = window . location . pathname + window . location . search . replace ( / [ ? & ] t h a n k s / , '' ) ;
223+ window . history . replaceState ( { } , '' , newUrl ) ;
224+ }
225+ }
226+ }
227+
228+ // Modal handling
229+ const modal = document . getElementById ( 'submit-modal' ) ;
230+ const btn = document . getElementById ( 'submit-code-btn' ) ;
231+ const span = document . getElementsByClassName ( 'close-modal' ) [ 0 ] ;
232+
233+ btn . onclick = function ( ) {
234+ modal . style . display = "block" ;
235+ }
236+
237+ span . onclick = function ( ) {
238+ modal . style . display = "none" ;
239+ }
240+
241+ window . onclick = function ( event ) {
242+ if ( event . target == modal ) {
243+ modal . style . display = "none" ;
244+ }
245+ }
246+
112247 const SUPPORTED_FORMAT_VERSION = 2 ;
113248 let errorData = [ ] ;
114249 let currentSort = { column : 'code' , direction : 'asc' } ;
0 commit comments