testing phpintelephense linter
This commit is contained in:
26
index.php
26
index.php
@@ -11,6 +11,7 @@ $details = isset($_GET['details']) ? $_GET['details'] : "";
|
|||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>PS4: Playtime</title>
|
<title>PS4: Playtime</title>
|
||||||
<meta id="viewport" name="viewport">
|
<meta id="viewport" name="viewport">
|
||||||
@@ -20,9 +21,10 @@ $details = isset($_GET['details']) ? $_GET['details'] : "";
|
|||||||
<script type="text/javascript" src="updatethumbnail.js"></script>
|
<script type="text/javascript" src="updatethumbnail.js"></script>
|
||||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$( document ).ready(function(){
|
$(document).ready(function() {
|
||||||
update();
|
update();
|
||||||
});
|
});
|
||||||
|
|
||||||
function update() {
|
function update() {
|
||||||
$.get('page.php?rootpage=<?php echo $rootpage; ?>&orderby=<?php echo $orderby; ?>&details=<?php echo $details; ?>', function(data) {
|
$.get('page.php?rootpage=<?php echo $rootpage; ?>&orderby=<?php echo $orderby; ?>&details=<?php echo $details; ?>', function(data) {
|
||||||
$("#page").html(data);
|
$("#page").html(data);
|
||||||
@@ -33,26 +35,25 @@ $details = isset($_GET['details']) ? $_GET['details'] : "";
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//mobile viewport hack
|
//mobile viewport hack
|
||||||
(function(){
|
(function() {
|
||||||
|
|
||||||
function apply_viewport(){
|
function apply_viewport() {
|
||||||
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
|
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
|
||||||
|
|
||||||
var ww = window.screen.width;
|
var ww = window.screen.width;
|
||||||
var mw = 520; // min width of site
|
var mw = 520; // min width of site
|
||||||
var ratio = ww / mw; //calculate ratio
|
var ratio = ww / mw; //calculate ratio
|
||||||
var viewport_meta_tag = document.getElementById('viewport');
|
var viewport_meta_tag = document.getElementById('viewport');
|
||||||
if( ww < mw){ //smaller than minimum size
|
if (ww < mw) { //smaller than minimum size
|
||||||
viewport_meta_tag.setAttribute('content', 'initial-scale=' + ratio + ', maximum-scale=' + ratio + ', minimum-scale=' + ratio + ', user-scalable=no, width=' + mw);
|
viewport_meta_tag.setAttribute('content', 'initial-scale=' + ratio + ', maximum-scale=' + ratio + ', minimum-scale=' + ratio + ', user-scalable=no, width=' + mw);
|
||||||
}
|
} else { //regular size
|
||||||
else { //regular size
|
|
||||||
viewport_meta_tag.setAttribute('content', 'initial-scale=1.0, maximum-scale=1, minimum-scale=1.0, user-scalable=yes, width=' + ww);
|
viewport_meta_tag.setAttribute('content', 'initial-scale=1.0, maximum-scale=1, minimum-scale=1.0, user-scalable=yes, width=' + ww);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//ok, i need to update viewport scale if screen dimentions changed
|
//ok, i need to update viewport scale if screen dimentions changed
|
||||||
window.addEventListener('resize', function(){
|
window.addEventListener('resize', function() {
|
||||||
apply_viewport();
|
apply_viewport();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -62,16 +63,19 @@ $details = isset($_GET['details']) ? $_GET['details'] : "";
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
<div id="message" style="display:none;"></div>
|
<div id="message" style="display:none;"></div>
|
||||||
|
|
||||||
<div id="page">
|
<div id="page">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user