update streamer page
This commit is contained in:
parent
05a95c328d
commit
61c0958bb1
|
@ -30,6 +30,14 @@
|
|||
<div class="side_menu">
|
||||
@menu("show", s.withoutStream.some)
|
||||
</div>
|
||||
<a class="blocker button" href="http://getublockorigin.com">
|
||||
<i data-icon=""></i>
|
||||
<strong>Install a malware blocker!</strong>
|
||||
Be safe from ads and trackers<br />
|
||||
infesting Twitch and YouTube.<br />
|
||||
We recommend uBlock Origin<br />
|
||||
which is free and open-source.
|
||||
</a>
|
||||
}
|
||||
|
||||
@moreCss = {
|
||||
|
@ -38,8 +46,18 @@
|
|||
}
|
||||
|
||||
@moreJs = {
|
||||
@jsTag("ads.js")
|
||||
@jsTag("streamer.js")
|
||||
@embedJs {
|
||||
$(function() {
|
||||
$('button.follow').click(function() {
|
||||
var klass = 'active';
|
||||
$(this).toggleClass(klass);
|
||||
$.ajax({
|
||||
url: '/rel/' + ($(this).hasClass('active') ? 'follow/' : 'unfollow/') + $(this).data('user'),
|
||||
method:'post'
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@title = @{ s"${s.titleName} streams chess" }
|
||||
|
|
|
@ -31,7 +31,7 @@ object Spam {
|
|||
private val replacements = List(
|
||||
s"""chess24.com\\?ref=\\w+""" -> "chess24.com",
|
||||
s"""chess.com/register\\?refId=\\w+""" -> "chess.com",
|
||||
s"""${protocol}${cb}(\\.com)?[^\\s]*""" -> tosUrl
|
||||
s"""\b${protocol}${cb}(\\.com)?[^\\s]*""" -> tosUrl
|
||||
).map {
|
||||
case (regex, replacement) => regex.r -> replacement
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
// Internet is a dangerous place.
|
||||
// You should really install a malware blocker to get rid of ads, trackers and malware sites.
|
||||
// Lichess recommends uBlock Origin. It's free and open source; fast and safe.
|
||||
// Get it for Firefox: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/
|
||||
// Get it for Chrome: https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=en
|
||||
lichess.needBlocker = true;
|
|
@ -1,25 +0,0 @@
|
|||
$(function() {
|
||||
$('button.follow').click(function() {
|
||||
var klass = 'active';
|
||||
$(this).toggleClass(klass);
|
||||
$.ajax({
|
||||
url: '/rel/' + ($(this).hasClass('active') ? 'follow/' : 'unfollow/') + $(this).data('user'),
|
||||
method:'post'
|
||||
});
|
||||
});
|
||||
setTimeout(function() {
|
||||
if (!lichess.needBlocker) return;
|
||||
var url = 'https://github.com/gorhill/uBlock#installation';
|
||||
if (lichess.isChrome) url = 'https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm';
|
||||
else if (navigator.userAgent.indexOf(' Firefox/') > -1) url = 'https://addons.mozilla.org/addon/ublock-origin/';
|
||||
else if (navigator.userAgent.indexOf(' Edge/') > -1) url = 'https://www.microsoft.com/store/p/app/9nblggh444l4';
|
||||
$('#site_header').append('<a class="blocker button" href="'+url+'">' +
|
||||
'<i data-icon=""></i>' +
|
||||
'<strong>Install a malware blocker!</strong>' +
|
||||
'Be safe from ads and trackers<br />' +
|
||||
'infesting Twitch and YouTube.<br />' +
|
||||
'We recommend uBlock Origin<br />' +
|
||||
'which is free and open-source.' +
|
||||
'</a>');
|
||||
}, 1000);
|
||||
});
|
Loading…
Reference in a new issue