mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-29 21:41:00 +00:00
Fixed footer button links to work when user changes from channel to frontpage
This commit is contained in:
@@ -101,12 +101,12 @@
|
|||||||
<img title="Contribute on GitHub" src="/static/images/GitHub_Logo.png" alt="GitHub" />
|
<img title="Contribute on GitHub" src="/static/images/GitHub_Logo.png" alt="GitHub" />
|
||||||
</a>
|
</a>
|
||||||
<p>
|
<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')">
|
<a id="facebook-code-link" 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" alt="Share on Facebook" />Share on Facebook
|
<img class="left" src="/static/images/facebook.png" alt="Share on Facebook" />Share on Facebook
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<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%20out%20this%20playlist%20<?php echo ucfirst($list); ?>%20on%20Zöff!&via=zoffmusic" target="popup" onclick="window.open('http://twitter.com/intent/tweet?url=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>&text=Check%20out%20this%20playlist%20<?php echo ucfirst($list); ?>%20on%20Zöff!&via=zoffmusic','Share Playlist','width=600,height=300')">
|
<a id="twitter-code-link" 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%20out%20this%20playlist%20<?php echo ucfirst($list); ?>%20on%20Zöff!&via=zoffmusic" target="popup" onclick="window.open('http://twitter.com/intent/tweet?url=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>&text=Check%20out%20this%20playlist%20<?php echo ucfirst($list); ?>%20on%20Zöff!&via=zoffmusic','Share Playlist','width=600,height=300')">
|
||||||
<img class="left" src="/static/images/twitter.png" alt="Share on Twitter" />Share on Twitter
|
<img class="left" src="/static/images/twitter.png" alt="Share on Twitter" />Share on Twitter
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
@@ -118,8 +118,8 @@
|
|||||||
</a>
|
</a>
|
||||||
</form>
|
</form>
|
||||||
<p>
|
<p>
|
||||||
<a href="//chart.googleapis.com/chart?chs=500x500&cht=qr&chl=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>&choe=UTF-8&chld=L%7C1" >
|
<a id="qr-code-link" target="_blank" href="//chart.googleapis.com/chart?chs=500x500&cht=qr&chl=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>&choe=UTF-8&chld=L%7C1" >
|
||||||
<img class="card rounded" src="//chart.googleapis.com/chart?chs=150x150&cht=qr&chl=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>&choe=UTF-8&chld=L%7C1" alt="QRCode for link" title="QR code for this page, for easy sharing!" />
|
<img id="qr-code-image-link" class="card rounded" src="//chart.googleapis.com/chart?chs=150x150&cht=qr&chl=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>&choe=UTF-8&chld=L%7C1" alt="QRCode for link" title="QR code for this page, for easy sharing!" />
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
2
static/dist/embed.min.js
vendored
2
static/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
2
static/dist/frontpage.min.js
vendored
2
static/dist/frontpage.min.js
vendored
File diff suppressed because one or more lines are too long
4
static/dist/main.min.js
vendored
4
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -210,6 +210,24 @@ var Helper = {
|
|||||||
$("#contact-container").html("Something went wrong, sorry about that. You could instead try with your own mail-client: <a title='Open in client' href='mailto:contact@zoff.no?Subject=Contact%20Zoff&Body=" + message + "'>contact@zoff.no</a>");
|
$("#contact-container").html("Something went wrong, sorry about that. You could instead try with your own mail-client: <a title='Open in client' href='mailto:contact@zoff.no?Subject=Contact%20Zoff&Body=" + message + "'>contact@zoff.no</a>");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
share_link_modifier: function(in_list){
|
||||||
|
if(in_list){
|
||||||
|
$("#facebook-code-link").attr("href", "https://www.facebook.com/sharer/sharer.php?u=https://zoff.no/" + chan.toLowerCase());
|
||||||
|
$("#facebook-code-link").attr("onclick", "window.open('https://www.facebook.com/sharer/sharer.php?u=https://zoff.no/" + chan.toLowerCase() + "', 'Share Playlist','width=600,height=300'); return false;");
|
||||||
|
$("#twitter-code-link").attr("href", "http://twitter.com/intent/tweet?url=https://zoff.no/" + chan.toLowerCase() + "&text=Check%20out%20this%20playlist%20" + chan.toLowerCase() + "%20on%20Zöff!&via=zoffmusic")
|
||||||
|
$("#twitter-code-link").attr("onclick", "window.open('http://twitter.com/intent/tweet?url=https://zoff.no/" + chan.toLowerCase() + "/&text=Check%20out%20this%20playlist%20" + chan.toLowerCase() + "%20on%20Zöff!&via=zoffmusic','Share Playlist','width=600,height=300'); return false;");
|
||||||
|
$("#qr-code-link").attr("href", "//chart.googleapis.com/chart?chs=500x500&cht=qr&chl=https://zoff.no/" + chan.toLowerCase() + "&choe=UTF-8&chld=L%7C1");
|
||||||
|
$("#qr-code-image-link").attr("src", "//chart.googleapis.com/chart?chs=150x150&cht=qr&chl=https://zoff.no/" + chan.toLowerCase() + "&choe=UTF-8&chld=L%7C1");
|
||||||
|
}else{
|
||||||
|
$("#facebook-code-link").attr("href", "https://www.facebook.com/sharer/sharer.php?u=https://zoff.no/");
|
||||||
|
$("#facebook-code-link").attr("onclick", "window.open('https://www.facebook.com/sharer/sharer.php?u=https://zoff.no/', 'Share Zöff','width=600,height=300'); return false;");
|
||||||
|
$("#twitter-code-link").attr("href", "http://twitter.com/intent/tweet?url=https://zoff.no/&text=Check%20out%20Zöff!&via=zoffmusic")
|
||||||
|
$("#twitter-code-link").attr("onclick", "window.open('http://twitter.com/intent/tweet?url=https://zoff.no/&text=Check%20out%20Zöff!&via=zoffmusic','Share Playlist','width=600,height=300'); return false;");
|
||||||
|
$("#qr-code-link").attr("href", "//chart.googleapis.com/chart?chs=500x500&cht=qr&chl=https://zoff.no/&choe=UTF-8&chld=L%7C1");
|
||||||
|
$("#qr-code-image-link").attr("src", "//chart.googleapis.com/chart?chs=150x150&cht=qr&chl=https://zoff.no/&choe=UTF-8&chld=L%7C1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ function init(){
|
|||||||
onepage_load();
|
onepage_load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Helper.share_link_modifier(true);
|
||||||
|
|
||||||
chan = $("#chan").html();
|
chan = $("#chan").html();
|
||||||
if(window.location.hostname == "zoff.no") add = "https://zoff.no";
|
if(window.location.hostname == "zoff.no") add = "https://zoff.no";
|
||||||
else add = "localhost";
|
else add = "localhost";
|
||||||
|
|||||||
@@ -270,6 +270,8 @@ function initfp(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Helper.share_link_modifier(false);
|
||||||
|
|
||||||
channel_list = $("#channel-list-container").html();
|
channel_list = $("#channel-list-container").html();
|
||||||
|
|
||||||
var connection_options = {
|
var connection_options = {
|
||||||
|
|||||||
Reference in New Issue
Block a user