Awesome qr shit and fucks

This commit is contained in:
Nicolas A. Tonne
2015-06-06 01:31:56 +02:00
parent 084c049983
commit 2b9d891098
8 changed files with 75 additions and 72 deletions

View File

@@ -4,6 +4,9 @@ RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteRule ^remote/(.*) php/controller.php?id=$1 [L]
RewriteRule ^remote php/controller.php [L]
RewriteCond %{REQUEST_URI} !(/$|\.)
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]

View File

@@ -1,13 +1,14 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">
<head>
<?php include("header.php"); ?>
<title>Zöff Remote</title>
<?php include("header.php"); ?>
</head>
<body>
<header>
<nav id="fp-nav">
<div class="nav-wrapper">
<a href="#" class="brand-logo hide-on-small-only">
<img id="zicon" src="static/images/squareicon_small.png" alt="zöff" title="Zöff">
<a href="zoff.no" class="brand-logo hide-on-small-only">
<img id="zicon" src="/static/images/squareicon_small.png" alt="zöff" title="Zöff">
</a>
<a href="zoff.no" class="brand-logo hide-on-med-and-up">Zöff</a>
<ul id="nav-mobile" class="right hide-on-med-and-down">
@@ -49,6 +50,9 @@
</header>
<main class="center-align container">
<div class="section">
<h3 id="remote-text"></h3>
</div>
<div class="section">
<form class="row" id="base" onsubmit="controll();return false;">
<div class="input-field col s12">
@@ -65,18 +69,26 @@
maxlength="8"
autocomplete
length="8"
value="<?php /*if(isset($_GET('id'))echo($_GET('id'));*/?>"
/>
<label for="search" id="forsearch">Type ID of host to be controlled</label>
<datalist id="searches">
</datalist>
</div>
</form>
<div id="remote-controls" style="display:none;">
<i id="remote_play" class="mdi-av-play-arrow"></i>
<i id="remote_pause" class="mdi-av-pause"></i>
<i id="remote_skip" class="mdi-av-skip-next"></i>
<a class="chan-link waves-effect btn green">
<i id="remote_play" class="mdi-av-play-arrow"></i>
</a>
<a class="chan-link waves-effect btn gray">
<i id="remote_pause" class="mdi-av-pause"></i>
</a>
<a class="chan-link waves-effect btn blue">
<i id="remote_skip" class="mdi-av-skip-next"></i>
</a>
</div>
<div id="volume-controll" style="display:none;"></div>
<p class="range-field">
<input type="range" id="volume-control" style="display:none;" min="0" value="100" max="100" />
</p>
</div>
<div class="section">
@@ -102,19 +114,19 @@
<ul>
<li>
<a href="https://play.google.com/store/apps/details?id=no.lqasse.zoff">
<img title="Get it on Google Play" src="static/images/google_play.png">
<img title="Get it on Google Play" src="/static/images/google_play.png">
</a>
<a href="https://github.com/nixolas1/Zoff">
<img title="Contribute on GitHub" src="static/images/GitHub_Logo.png">
<img title="Contribute on GitHub" src="/static/images/GitHub_Logo.png">
</a>
<p>
<a class="waves-effect waves-light btn light-blue share shareface" href="https://www.facebook.com/sharer/sharer.php?u=http://<?php echo $_SERVER['HTTP_HOST']; ?>" target="popup" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=http://<?php echo $_SERVER['HTTP_HOST']; ?>','Share Playlist','width=600,height=300')">
<img class="left" src="static/images/facebook.png">Share on Facebook
<img class="left" src="/static/images/facebook.png">Share on Facebook
</a>
</p>
<p>
<a class="waves-effect waves-light btn light-blue share" href="http://twitter.com/intent/tweet?url=http://<?php echo $_SERVER['HTTP_HOST']; ?>&text=Check out Zöff!&via=zoffmusic" target="popup" onclick="window.open('http://twitter.com/intent/tweet?url=http://<?php echo $_SERVER['HTTP_HOST']; ?>&text=Check out Zöff!&via=zoffmusic','Share Playlist','width=600,height=300')">
<img class="left" src="static/images/twitter.png">Share on Twitter
<img class="left" src="/static/images/twitter.png">Share on Twitter
</a>
</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank" id="donate_form">
@@ -146,8 +158,8 @@
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>
<script src="//cdn.socket.io/socket.io-1.2.0.js"></script>
<script type="text/javascript" src="static/js/lib/materialize.js"></script>
<script type="text/javascript" src="static/js/mobilecontroller.js"></script>
<script type="text/javascript" src="/static/js/lib/materialize.js"></script>
<script type="text/javascript" src="/static/js/remotecontroller.js"></script>
<noscript><p><img src="//zoff.no/analyse/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
</body>
</html>

View File

@@ -16,19 +16,19 @@
<ul>
<li>
<a href="https://play.google.com/store/apps/details?id=no.lqasse.zoff">
<img title="Get it on Google Play" src="static/images/google_play.png">
<img title="Get it on Google Play" src="/static/images/google_play.png">
</a>
<a href="https://github.com/nixolas1/Zoff">
<img title="Contribute on GitHub" src="static/images/GitHub_Logo.png">
<img title="Contribute on GitHub" src="/static/images/GitHub_Logo.png">
</a>
<p>
<a class="waves-effect waves-light btn light-blue share shareface" href="https://www.facebook.com/sharer/sharer.php?u=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>" target="popup" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>','Share Playlist','width=600,height=300')">
<img class="left" src="static/images/facebook.png">Share on&nbspFacebook
<img class="left" src="/static/images/facebook.png">Share on&nbspFacebook
</a>
</p>
<p>
<a class="waves-effect waves-light btn light-blue share" href="http://twitter.com/intent/tweet?url=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>&text=Check out this playlist <?php echo ucfirst($list); ?> on Zöff!&via=zoffmusic" target="popup" onclick="window.open('http://twitter.com/intent/tweet?url=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>&text=Check out this playlist <?php echo ucfirst($list); ?> on Zöff!&via=zoffmusic','Share Playlist','width=600,height=300')">
<img class="left" src="static/images/twitter.png">Share on&nbspTwitter
<img class="left" src="/static/images/twitter.png">Share on&nbspTwitter
</a>
</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank" id="donate_form">
@@ -58,10 +58,10 @@
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<!--<script type="text/javascript" src="static/js/lib/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="static/js/lib/jquery-ui-1.10.3.min.js"></script>-->
<!--<script type="text/javascript" src="/static/js/lib/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="/static/js/lib/jquery-ui-1.10.3.min.js"></script>-->
<script src="//cdn.socket.io/socket.io-1.2.0.js"></script>
<!--<script type="text/javascript" src="static/js/lib/iscroll-min.js"></script>-->
<!--<script type="text/javascript" src="/static/js/lib/iscroll-min.js"></script>-->
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/sha256.js"></script>
<script>
var socket = io.connect('http://'+window.location.hostname+':3000');
@@ -73,16 +73,16 @@
</script>
<script type="text/javascript" src="static/js/list.js"></script>
<script type="text/javascript" src="static/js/searchlist.js"></script>
<script type="text/javascript" src="static/js/playercontrols.js"></script>
<script type="text/javascript" src="static/js/youtube.js"></script>
<script type="text/javascript" src="static/js/search.js"></script>
<script type="text/javascript" src="static/js/admin.js"></script>
<script type="text/javascript" src="static/js/chat.js"></script>
<script type="text/javascript" src="static/js/hostcontroller.js"></script>
<script type="text/javascript" src="static/js/remotecontroller.js"></script>
<script type="text/javascript" src="static/js/lib/materialize.js"></script>
<script type="text/javascript" src="/static/js/list.js"></script>
<script type="text/javascript" src="/static/js/searchlist.js"></script>
<script type="text/javascript" src="/static/js/playercontrols.js"></script>
<script type="text/javascript" src="/static/js/youtube.js"></script>
<script type="text/javascript" src="/static/js/search.js"></script>
<script type="text/javascript" src="/static/js/admin.js"></script>
<script type="text/javascript" src="/static/js/chat.js"></script>
<script type="text/javascript" src="/static/js/hostcontroller.js"></script>
<script type="text/javascript" src="/static/js/remotecontroller.js"></script>
<script type="text/javascript" src="/static/js/lib/materialize.js"></script>
<!-- Piwik tracking -->
<script type="text/javascript">

View File

@@ -10,10 +10,10 @@
<meta name="description" content="The shared YouTube radio.">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:image" content="static/images/highlogo.png" />
<meta property="og:image" content="/static/images/highlogo.png" />
<meta property="og:title" content="Zöff">
<meta property="og:description" content="The shared YouTube radio.">
<meta property="og:type" content="website">
<link type="text/css" rel="stylesheet" href="static/css/materialize.min.css" media="screen,projection"/>
<link rel="stylesheet" type="text/css" href="static/css/style.css" title="Default" />
<link rel="icon" id="favicon" type="image/png" href="static/images/favicon.png"/>
<link type="text/css" rel="stylesheet" href="/static/css/materialize.min.css" media="screen,projection"/>
<link rel="stylesheet" type="text/css" href="/static/css/style.css" title="Default" />
<link rel="icon" id="favicon" type="image/png" href="/static/images/favicon.png"/>

View File

@@ -99,6 +99,12 @@
</a>
<div class="collapsible-body">
<ul>
<li>
<a id="code-link">
<img id="code-qr" alt="QR code for control" title="Link to control this Zöff player2">
<h4 id="code-text">ABBADUR</h4>
</a>
</li>
<li>
<form class="row" id="base" onsubmit="controll();return false;">
<div class="input-field">

View File

@@ -762,36 +762,11 @@ ul #chat-log{
cursor:pointer;
}
/*#volume-controll {
cursor:pointer;
float:left;
position: relative;
left: 10px;
margin: 13px auto;
height:5px;
width: 97%;
background-color:rgba(0, 0, 0, 0.5);
border: none;
outline: none;
border-radius: 2px;
#code-text{
color:#000;
}
#code-link{
height: auto;
text-align: center;
}
#volume-controll .ui-slider-range-min {
height:5px;
width: 75px;
position: absolute;
background-color:rgba(55, 255, 0, 1);
border: none;
outline: none;
border-radius: 2px;
}
#volume-controll .ui-slider-handle {
height:15px;
width:5px;
background-color:black;
position: absolute;
cursor: pointer;
outline: none;
border: none;
}*/

View File

@@ -3,7 +3,11 @@ var id
socket.on("id", function(id)
{
console.log(id);
console.log("Unique remote control ID: " + id);
var codeURL = "http://"+window.location.hostname+"/remote/"+id;
$("#code-text").text(id.toUpperCase())
$("#code-qr").attr("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+codeURL);
$("#code-link").attr("href", codeURL);
if(!began)
{
socket.on(id, function(arr)

View File

@@ -3,8 +3,11 @@ var id;
//var socket;
$(document).ready(function (){
//setTimeout(function(){$("#code-input").focus();},500);
//socket = io.connect('http://'+window.location.hostname+':3000');
setTimeout(function(){$("#code-input").focus();},500);
socket = io.connect('http://'+window.location.hostname+':3000');
id = window.location.pathname.split("/")[2];
if(id)
control();
});
document.getElementById("remote_play").addEventListener("click", function()
@@ -31,13 +34,13 @@ function control()
{
if(start)
{
id = $("#code-input").val().toLowerCase();
if(!id)id = $("#code-input").val().toLowerCase();
$("#code-input").val("");
start = false;
$("#volume-control").css("display", "block");
$("#remote-controls").css("display", "block");
$("#remote-text").text("Controlling "+ id.toUpperCase())
$("#code-input").attr("length", "18");
$("#code-input").attr("maxlength", "18");
$("#forsearch").html("Type new channel name to change to");