Compare commits

...

2 Commits

Author SHA1 Message Date
Markus Koch 61131488c9 Add videoframe styles 2018-06-03 18:46:50 +02:00
Markus Koch a1be4e8e66 Use POST for optin-once 2018-06-03 18:46:24 +02:00
3 changed files with 15 additions and 3 deletions

View File

@ -21,8 +21,8 @@
}
$optin = "";
if (isset($_GET['optin-once'])) {
$_COOKIE['opt-in'] = $_GET['optin-once'];
if (isset($_POST['optin-once'])) {
$_COOKIE['opt-in'] = $_POST['optin-once'];
}
if (isset($_COOKIE['opt-in'])) {
$opt = $_COOKIE['opt-in'];

View File

@ -132,7 +132,7 @@
if (opted_in('y')) {
echo '<iframe width="100%" height="100%" src="' . $url . '" frameborder="0" allowfullscreen></iframe>';
} else {
echo "<table border=0 style='height:100%;width:100%'><tr><td style='text-align:center;'>Embedded content has been disabled to protect your privacy.<br><br><br><strong><a href='" . append_param("optin-once=y") . "'>Click here to load the videos on this site once,</a></strong><br><br><strong><a href='/?p=privacy-controls'>or click here to allow them permanently,</a><br><br><a href=\"" . $youtube['link'] . "\">" . "or click here to watch the video on YouTube:<br>" . $youtube['link'] . "</a></strong><br><br><br>Please note that by enabling this video, data is transferred <br>to YouTube LLC, and is subject to their privacy policy.</td></tr></table>";
echo "<table border=0 style='height:100%;width:100%'><tr><td style='text-align:center;'>Embedded content has been disabled to protect your privacy.<br><br><br><strong><form action='' method='post'><input type='hidden' name='optin-once' value='y' /><input type='submit' value='Click here to load the videos on this site once,'/></form></strong><br><br><strong><a href='/?p=privacy-controls'>or click here to allow them permanently,</a><br><br><a href=\"" . $youtube['link'] . "\">" . "or click here to watch the video on YouTube:<br>" . $youtube['link'] . "</a></strong><br><br><br>Please note that by enabling this video, data is transferred <br>to YouTube LLC, and is subject to their privacy policy.</td></tr></table>";
}
} else {
// TODO: HTML5 video

View File

@ -124,6 +124,18 @@ content .videoframe {
margin-left:16px;
box-shadow: 0px 0px 3px white;
border: 1 px solid #f3f3f3;
background-color: black;
color: white;
}
content .videoframe a {
color:lightblue;
}
content .videoframe input {
background: none;
border: none;
font-weight: bold;
cursor: pointer;
color:lightblue;
}
content vidcaption {
margin-left: 18px;