@@ -1806,12 +1806,61 @@ <h4>⚠️ Input Tidak Valid</h4>
18061806 . catch ( err => console . log ( 'Service Worker failed' , err ) ) ;
18071807 }
18081808
1809- //📌 kod terminal verification //
1809+ //📌 kod open terminal verification
18101810function openTerminalVerification ( ) {
18111811 closeMenu ( ) ; // tutup menu
18121812 setTimeout ( ( ) => window . location . href = 'terminal-verification.html' , 200 ) ;
18131813}
18141814
1815+ //📌 AZURA AI - AUTO OPEN MENU SCRIPT
1816+ // Letak dalam <script> tag di index.html
1817+ ( function ( ) {
1818+ // Function untuk buka menu
1819+ function openHamburgerMenu ( ) {
1820+ const sidebar = document . getElementById ( 'sidebarMenu' ) ;
1821+ const overlay = document . getElementById ( 'menuOverlay' ) ;
1822+
1823+ if ( sidebar && overlay ) {
1824+ sidebar . style . left = '0' ;
1825+ overlay . style . display = 'block' ;
1826+ console . log ( '✅ Menu auto-opened from terminal' ) ;
1827+ }
1828+ }
1829+
1830+ // Function untuk tutup menu (jika diperlukan)
1831+ function closeHamburgerMenu ( ) {
1832+ const sidebar = document . getElementById ( 'sidebarMenu' ) ;
1833+ const overlay = document . getElementById ( 'menuOverlay' ) ;
1834+
1835+ if ( sidebar && overlay ) {
1836+ sidebar . style . left = '-250px' ;
1837+ overlay . style . display = 'none' ;
1838+ }
1839+ }
1840+
1841+ // Check URL parameter bila page load
1842+ document . addEventListener ( 'DOMContentLoaded' , function ( ) {
1843+ const urlParams = new URLSearchParams ( window . location . search ) ;
1844+
1845+ if ( urlParams . get ( 'menu' ) === 'open' ) {
1846+ // Auto-open menu dengan delay untuk smooth transition
1847+ setTimeout ( ( ) => {
1848+ openHamburgerMenu ( ) ;
1849+
1850+ // Optional: Clean URL (remove parameter)
1851+ if ( window . history . replaceState ) {
1852+ const cleanUrl = window . location . pathname + window . location . hash ;
1853+ window . history . replaceState ( { } , document . title , cleanUrl ) ;
1854+ }
1855+ } , 300 ) ;
1856+ }
1857+
1858+ // Expose functions ke global scope (optional)
1859+ window . openAzuraMenu = openHamburgerMenu ;
1860+ window . closeAzuraMenu = closeHamburgerMenu ;
1861+ } ) ;
1862+ } ) ( ) ;
1863+
18151864 </ script >
18161865</ body >
18171866</ html >
0 commit comments