{
$datas = parse_url($loc);
- if (isset($datas['scheme']) && !is_null($datas['scheme']) || strpos($loc,'#')===0) {
+ if (isset($datas['scheme']) && !is_null($datas['scheme']) || strpos($loc, '#') === 0) {
return $loc;
} else {
if ($css) {
} elseif ($ext == 'zip') {
$d = $this->unzipFile($this->alternative, false);
$this->_config = $this->getConfigZIP($d['dir']);
+ $html = file_get_contents($d['dir'] . '/index.html');
+ $html = str_replace('var pRatio = window.devicePixelRatio || 1,', 'var pRatio = 0.5,', $html);
$this->copyExternalDir($d['dir'], $d['fdir']);
+ $this->_config['lowDef'] = 'index_ld.html';
+ $this->compiler->vdir->file_put_contents($d['fdir'] . '/' . $this->_config['lowDef'], $html);
} elseif ($ext == 'html') {
$fdir = 'data/links';
$dir = $fdir;
$this->_config = array('html' => false, 'width' => $this->width, 'height' => $this->height);
}
- if($this->_config['width']==0){
- $this->_config['width']=$this->width;
+ if ($this->_config['width'] == 0) {
+ $this->_config['width'] = $this->width;
}
- if($this->_config['height']==0){
- $this->_config['height']=$this->height;
+ if ($this->_config['height'] == 0) {
+ $this->_config['height'] = $this->height;
}
$res = '';
$iw = $this->_config['width'];
$ih = $this->_config['height'];
- $res = '<iframe data-width="' . $iw . '" data-height="' . $ih . '" width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
+ $ld = '';
+ if (isset($this->_config['lowDef'])) {
+ $ld = ' data-ld="' . str_replace('index.html', $this->_config['lowDef'], $this->_url) . '" ';
+ }
+
+ $res = '<iframe ' . $ld . ' data-width="' . $iw . '" data-height="' . $ih . '" width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
}
if ($this->_externalIframe !== false) {
$s = $this->in_popup ? 1 : $this->getCssScale();
$cl->setArg('title', $this->appName);\r
$cl->setArg('output-dir', $this->buildPath);\r
$cl->setArg('nw-version', $this->nwversion);\r
- $cl->setArg('sdk-build');\r
+ //$cl->setArg('sdk-build');\r
$cl->setArg('main', 'index.html');\r
$cl->setArg('name', $this->exeName);\r
$cl->setArg('mac-icon', $this->vdir . 'icon.icns');\r