working prototype, many features missing

This commit is contained in:
2025-01-13 15:58:58 +00:00
parent 028a4b54f4
commit fbe7613f97
4 changed files with 13 additions and 43 deletions

View File

@ -21,7 +21,7 @@ switch($url[0])
{
case 'api':
$target = substr($_SERVER['REQUEST_URI'],5);
if(!$target)
if(!$target || !filter_var($target, FILTER_VALIDATE_URL))
$target = $_REQUEST['url'];
$viewport = $_REQUEST['viewport'];
$js = $_REQUEST['js']=='false'?false:true;

View File

@ -3,7 +3,8 @@ $(function() {
{
$("#showcase_button").attr("disabled","true");
var urlenc = encodeURIComponent(url);
var imageURL = "api.php?js=no&cache=1&viewport=1200x330&url="+urlenc;
var host = location.protocol + '//' + location.host;
var imageURL = host+"/api/?js=false&viewport=1200x330&url="+urlenc;
//$("#intro-header").css('background-image', 'url(\'/img/loading.gif\')');
$("#loading").show();