137,7 → 137,7 |
width="120" |
height="168" |
alt="<?php echo _("Vulcan greeting"); ?>" |
title="" |
title="<?php echo _("Vulcan greeting"); ?>" |
style="border: none; cursor: default" |
onmouseover="return setStatus(this.title)" |
onmouseout="return resetStatus()"><br> |
363,124 → 363,217 |
<div class="upper"> |
<div class="content"> |
<div class="title"><span>Home</span></div> |
<div class="analysis"> </div> |
<script type="text/javascript"> |
var fullscreen = (function () { |
var _isHostMethod = jsx.object.isHostMethod; |
|
return { |
getSupportedProperty: function (base, names, test) { |
for (var i = 0, len = names.length; i < len; ++i) |
{ |
var name = names[i]; |
if (test.call(null, base, name)) |
{ |
return name; |
} |
} |
<div class="analysis"> |
<table> |
<tr> |
<th><?php echo _('Display'); ?>:</th> |
<td><script type="text/javascript"> |
var dim = { |
getScreen: function () { |
return screen.width + "×" + screen.height; |
}, |
|
return null; |
}, |
getAvail: function () { |
return screen.availWidth + "×" + screen.availHeight; |
}, |
|
getSupportedCancel: (function () { |
var _supportedCancel; |
getInner: function () { |
return window.innerWidth + "×" + window.innerHeight; |
}, |
|
return function () { |
if (typeof _supportedCancel == "undefined") |
{ |
var properties = ["cancelFullScreen", "mozCancelFullScreen", |
"webkitCancelFullScreen"]; |
|
_supportedCancel = this.getSupportedProperty(document, properties, _isHostMethod); |
getColorDepth: function () { |
return (screen.colorDepth || screen.pixelDepth); |
} |
|
return _supportedCancel; |
}; |
}()), |
|
getSupportedElement: (function () { |
var _supportedElement; |
|
return function () { |
if (typeof _supportedElement == "undefined") |
{ |
var properties = ["fullscreenElement", "mozFullscreenElement", |
"webkitFullscreenElement"]; |
var displayInfo; |
(function () { |
displayInfo = |
'<span id="screenDim">' + dim.getScreen() + '<\/span>' |
+ ' (<span id="availDim">' + dim.getAvail() + "<\/span> <?php echo _('available'); ?>," |
+ ' <span id="innerDim">' + dim.getInner() + "<\/span> <?php echo _('used'); ?>) <?php echo _('pixels'); ?>" |
+ ' × 2<sup><span id="colorDepth">' + dim.getColorDepth() + "<\/span><\/sup> <?php echo _('colors'); ?>"; |
|
_supportedElement = this.getSupportedProperty(document, properties, |
function (base, name) { |
return typeof base[name] != "undefined"; |
}); |
} |
|
return _supportedElement; |
/* FIXME: Convert HTML to text, update whole title text */ |
document.write('<span>' + displayInfo + '<\/span>'); |
}()); |
|
window.onresize = function () { |
/* FIXME: Update whole title text */ |
document.getElementById("screenDim").innerHTML = dim.getScreen(); |
document.getElementById("availDim").innerHTML = dim.getAvail(); |
document.getElementById("innerDim").innerHTML = dim.getInner(); |
}; |
}()), |
|
isSupportedBy: function (elem) { |
var methods = ["requestFullscreen", "mozRequestFullscreen", |
"webkitRequestFullscreen"]; |
return this.getSupportedProperty(elem, methods, _isHostMethod); |
}, |
|
isFullscreen: function () { |
var properties = ["fullscreenElement", "mozFullscreenElement", |
"webkitFullscreenElement"]; |
var supportedProperty = this.getSupportedProperty( |
document, properties, |
function (base, name) { |
return typeof base[name] != "undefined"; |
}); |
|
return supportedProperty && document[supportedProperty] != null; |
}, |
|
cancel: function (target, oldHandler, textTarget) { |
var supportedCancel = this.getSupportedCancel(); |
if (supportedCancel) |
{ |
document[supportedCancel](); |
window.setTimeout(function () { |
/* FIXME: Update whole title text */ |
document.getElementById("colorDepth").innerHTML = dim.getColorDepth(); |
}, 1000); |
</script><noscript><?php echo _('N/A'); ?></noscript></td> |
</tr> |
<tr> |
<th><?php echo _('User Agent'); ?>:</th> |
<td><script type="text/javascript"> |
(function () { |
var ua = navigator.userAgent; |
document.write('<span id="ua" title="' + ua + '">' + ua + '<\/span>'); |
|
window.setTimeout(function () { |
document.getElementById("ua").innerHTML = navigator.userAgent; |
}, 1000); |
}()); |
</script><noscript><?php echo _('N/A'); ?></noscript></td> |
</tr> |
<tr> |
<th><?php echo _('Features'); ?>:</th> |
<td><script type="text/javascript"> |
var fullscreen = (function () { |
var _isHostMethod = jsx.object.isHostMethod; |
|
var supportedElement = this.getSupportedElement(); |
if (supportedElement) |
{ |
if (document[supportedElement] == null) |
{ |
if (textTarget) |
return { |
getSupportedProperty: function (base, names, test) { |
for (var i = 0, len = names.length; i < len; ++i) |
{ |
textTarget.textContent = "<?php echo _("Fullscreen"); ?>"; |
var name = names[i]; |
if (test.call(null, base, name)) |
{ |
return name; |
} |
} |
|
if (target) |
|
return null; |
}, |
|
getSupportedCancel: (function () { |
var _supportedCancel; |
|
return function () { |
if (typeof _supportedCancel == "undefined") |
{ |
var properties = ["cancelFullScreen", "mozCancelFullScreen", |
"webkitCancelFullScreen"]; |
|
_supportedCancel = this.getSupportedProperty(document, properties, _isHostMethod); |
} |
|
return _supportedCancel; |
}; |
}()), |
|
getSupportedElement: (function () { |
var _supportedElement; |
|
return function () { |
if (typeof _supportedElement == "undefined") |
{ |
var properties = ["fullscreenElement", "mozFullscreenElement", |
"webkitFullscreenElement"]; |
|
_supportedElement = this.getSupportedProperty(document, properties, |
function (base, name) { |
return typeof base[name] != "undefined"; |
}); |
} |
|
return _supportedElement; |
}; |
}()), |
|
isSupportedBy: function (elem) { |
var methods = ["requestFullscreen", "mozRequestFullscreen", |
"webkitRequestFullscreen"]; |
return this.getSupportedProperty(elem, methods, _isHostMethod); |
}, |
|
isFullscreen: function () { |
var properties = ["fullscreenElement", "mozFullscreenElement", |
"webkitFullscreenElement"]; |
var supportedProperty = this.getSupportedProperty( |
document, properties, |
function (base, name) { |
return typeof base[name] != "undefined"; |
}); |
|
return supportedProperty && document[supportedProperty] != null; |
}, |
|
cancel: function (target, oldHandler, textTarget) { |
var supportedCancel = this.getSupportedCancel(); |
if (supportedCancel) |
{ |
target.onclick = oldHandler; |
document[supportedCancel](); |
|
var supportedElement = this.getSupportedElement(); |
if (supportedElement) |
{ |
if (document[supportedElement] == null) |
{ |
if (textTarget) |
{ |
textTarget.textContent = "<?php echo _("Fullscreen"); ?>"; |
} |
|
if (target) |
{ |
target.onclick = oldHandler; |
} |
} |
} |
} |
}, |
|
requestOn: function (elem, eventTarget, textTarget) { |
var requestMethodName; |
|
if (elem && (requestMethodName = this.isSupportedBy(elem))) |
{ |
elem[requestMethodName](); |
if (textTarget && this.isFullscreen()) |
{ |
var oldText = textTarget.textContent; |
var me = this; |
var oldHandler = eventTarget.onclick; |
eventTarget.onclick = function () { |
me.cancel(this, oldHandler, textTarget); |
}; |
textTarget.textContent = "<?php echo _("Window"); ?>"; |
} |
} |
} |
} |
} |
}, |
|
requestOn: function (elem, eventTarget, textTarget) { |
var requestMethodName; |
}; |
}()); |
|
if (elem && (requestMethodName = this.isSupportedBy(elem))) |
{ |
elem[requestMethodName](); |
if (textTarget && this.isFullscreen()) |
(function () { |
function getFeatures () |
{ |
var oldText = textTarget.textContent; |
var me = this; |
var oldHandler = eventTarget.onclick; |
eventTarget.onclick = function () { |
me.cancel(this, oldHandler, textTarget); |
}; |
textTarget.textContent = "<?php echo _("Window"); ?>"; |
var features = []; |
if (navigator.cookieEnabled) features.push("<?php echo _('Cookies'); ?>"); |
if (fullscreen.isSupportedBy(document.documentElement)) features.push("<?php echo _('Fullscreen'); ?>"); |
if (navigator.webkitGetGamepads && navigator.webkitGetGamepads().length) features.push("<?php echo _('Gamepad'); ?>"); |
if (navigator.geolocation) features.push("<?php echo _('Geolocation'); ?>"); |
if (typeof navigator.javaEnabled != "undefined" && navigator.javaEnabled()) features.push("Java"); |
if (typeof window.localStorage != "undefined") features.push("Local Storage"); |
if (navigator.plugins) features.push("Plugins"); |
if (typeof window.sessionStorage != "undefined") features.push("Session Storage"); |
if (typeof window.ontouchstart != "undefined") features.push("Touch"); |
return features.join(" • "); |
} |
} |
} |
}; |
}()); |
</script> |
|
var sFeatures = getFeatures(); |
document.write('<span id="features" title="' + sFeatures + '">' + sFeatures + '<\/span>'); |
|
window.setTimeout(function () { |
var sFeatures = getFeatures(); |
var oFeatures = document.getElementById("features"); |
oFeatures.innerHTML = sFeatures; |
/* Converts CREs */ |
oFeatures.title = oFeatures.innerHTML; |
}, 1000); |
}()); |
</script><noscript><?php echo _('N/A'); ?></noscript></td> |
</tr> |
</table> |
</div> |
<ul class="commands"> |
<li id="cmd1"><a href="index.php" |
title="Language selection" |