website - load mobile .apk version, and embedded IITC version, dynamically - ensures the data remains up to date, even for the 'test builds' page

This commit is contained in:
Jon Atkins
2013-04-30 16:39:17 +01:00
parent ec7d18232a
commit a9034f3832
4 changed files with 93 additions and 9 deletions

View File

@ -1,11 +1,14 @@
<?php
function loadUserScriptHeader($path)
function loadUserScriptHeader($file)
{
$result = Array();
$f = fopen ( $path, "rt" );
while ( ( $line = fgets ( $f ) ) !== FALSE )
if ( is_string($file) )
$file = fopen ( $file, "rt" );
# else assume it's already a readable stream
while ( ( $line = fgets ( $file ) ) !== FALSE )
{
if ( preg_match ( '#//[ \\t]*==/UserScript==#', $line ) )
break;