Skip to content

Commit 1565b05

Browse files
committed
Move selector to agecheck script
1 parent d414a3c commit 1565b05

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

scripts/store/agecheck.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44

55
if( GetCurrentAppID() > 0 )
66
{
7-
const elementIdsToTry =
7+
const selectorsToTry =
88
[
9-
'error_box',
10-
'app_agegate',
11-
'agegate_box',
9+
'#error_box',
10+
'#app_agegate',
11+
'#agegate_box',
12+
'.agegate_age_validation',
1213
];
1314

14-
for( const id of elementIdsToTry )
15+
for( const selector of selectorsToTry )
1516
{
16-
const container = document.getElementById( id );
17+
const container = document.querySelector( selector );
1718

1819
if( container )
1920
{

scripts/store/app.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ if( document.getElementById( 'error_box' ) )
99
{
1010
AddLinksInErrorBox( document.getElementById( 'error_box' ) );
1111
}
12-
else if( document.querySelector( '.agegate_age_validation' ) )
13-
{
14-
AddLinksInErrorBox( document.querySelector( '.agegate_age_validation' ) );
15-
}
1612
else
1713
{
1814
GetOption( {

0 commit comments

Comments
 (0)