File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ <h3>Explorer</h3>
107107 < script
108108 src ="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-markup-templating.min.js "> </ script >
109109 < script src ="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-php.min.js "> </ script >
110- < script src ="script.js "> </ script >
110+ < script src ="script.js?v=1.0 "> </ script >
111111</ body >
112112
113113</ html >
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const outputConsole = document.getElementById('output-console');
1111const clearConsoleBtn = document . getElementById ( 'clear-console' ) ;
1212const refreshFilesBtn = document . getElementById ( 'refresh-files' ) ;
1313
14- const CACHE_KEY = 'php_repos_cache ' ;
14+ const CACHE_KEY = 'php_repos_cache_v1 ' ;
1515const CACHE_DURATION = 5 * 60 * 1000 ; // 5 minutes
1616
1717let currentCode = '' ;
@@ -37,7 +37,7 @@ async function fetchFiles(isBackground = false) {
3737 if ( ! isBackground ) {
3838 // checks if we already have files displayed (optimization)
3939 if ( fileListEl . children . length === 0 || fileListEl . querySelector ( '.loading-spinner' ) ) {
40- fileListEl . innerHTML = '<div class="loading-spinner"><div class="spinner"></div></div>' ;
40+ fileListEl . innerHTML = '<div class="loading-spinner"><div class="spinner"></div></div>' ;
4141 }
4242 }
4343
@@ -59,12 +59,12 @@ async function fetchFiles(isBackground = false) {
5959
6060 // 2. Data not in cache or expired, fetch from API
6161 if ( ! usedCache ) {
62- // Remove timestamp to allow browser-level caching (304 Not Modified)
62+ // Remove timestamp to allow browser-level caching (304 Not Modified)
6363 const response = await fetch ( API_URL ) ;
6464
6565 if ( ! response . ok ) throw new Error ( `GitHub API Error: ${ response . status } ` ) ;
6666 data = await response . json ( ) ;
67-
67+
6868 // Save to cache
6969 localStorage . setItem ( CACHE_KEY , JSON . stringify ( {
7070 timestamp : Date . now ( ) ,
You can’t perform that action at this time.
0 commit comments