remove all mobile deep links
parent
db7ea9b19b
commit
a4ea7cf328
|
@ -1,6 +1,6 @@
|
|||
@(u: User)(implicit ctx: Context)
|
||||
|
||||
<div class="new_player" data-id="@u.id">
|
||||
<div class="new_player">
|
||||
<h2>Welcome to lichess.org!</h2>
|
||||
<p>
|
||||
This is your profile page.
|
||||
|
|
|
@ -4,7 +4,6 @@ window.onload = function() {
|
|||
var element = document.getElementById('challenge');
|
||||
var challenge = opts.data.challenge;
|
||||
var accepting;
|
||||
if (!opts.owner) lichess.openInMobileApp('/challenge/' + challenge.id);
|
||||
lichess.socket = new lichess.StrongSocket(
|
||||
opts.socketUrl,
|
||||
opts.data.socketVersion, {
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
$(function() {
|
||||
|
||||
var newUserId = $('.new_player').data('id');
|
||||
if (newUserId) lichess.openInMobileApp('/user/' + newUserId);
|
||||
|
||||
$('div.user_show .mod_zone_toggle').each(function() {
|
||||
$(this).click(function() {
|
||||
var $zone = $('div.user_show .mod_zone');
|
||||
|
|
|
@ -1733,28 +1733,6 @@ div.lichess_overboard .close:hover {
|
|||
background: #f0f0f0;
|
||||
}
|
||||
|
||||
#deeplink {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
display: flex;
|
||||
box-shadow: 0 5px 6px rgba(0, 0, 0, 0.3);
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#deeplink a {
|
||||
flex: 1 1 auto;
|
||||
font-size: 2em;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
background: #3893E8;
|
||||
color: #fff;
|
||||
}
|
||||
#deeplink a:nth-child(2) {
|
||||
flex: 0 0 3em;
|
||||
background: #dc322f;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@keyframes fire {
|
||||
0% {
|
||||
text-shadow: 0 0 6.66px #fefcc9,
|
||||
|
|
|
@ -2,7 +2,6 @@ var defined = require('common').defined;
|
|||
|
||||
module.exports = function(element, cfg) {
|
||||
var data = cfg.data;
|
||||
lichess.openInMobileApp('/analyse/' + data.game.id);
|
||||
var $watchers = $('#site_header div.watchers').watchers();
|
||||
var analyse, $panels;
|
||||
lichess.socket = lichess.StrongSocket(
|
||||
|
|
|
@ -7,7 +7,6 @@ const li = window.lichess;
|
|||
|
||||
export default function(opts: RoundOpts, element: HTMLElement): void {
|
||||
const data: RoundData = opts.data;
|
||||
li.openInMobileApp(data.game.id);
|
||||
let round: RoundApi, chat: ChatCtrl | undefined;
|
||||
if (data.tournament) $('body').data('tournament-id', data.tournament.id);
|
||||
li.socket = li.StrongSocket(
|
||||
|
|
|
@ -139,28 +139,6 @@ lichess.topMenuIntent = function() {
|
|||
return atob(t.split("").reverse().join(""));
|
||||
};
|
||||
|
||||
lichess.openInMobileApp = function(path) {
|
||||
if (!/android.+mobile|ipad|iphone|ipod/i.test(navigator.userAgent || navigator.vendor)) return;
|
||||
var storage = lichess.storage.make('deep-link');
|
||||
var stored = storage.get();
|
||||
if (stored > 0) storage.set(stored - 1);
|
||||
else {
|
||||
$('#deeplink').remove();
|
||||
var pane = $('<div id="deeplink">' +
|
||||
'<a href="lichess://' + path + '">Open with <strong>Mobile app</strong></a>' +
|
||||
'<a>X</a>' +
|
||||
'</div>'
|
||||
).find('a').click(function() {
|
||||
$('#deeplink').remove();
|
||||
document.body.dispatchEvent(new Event('chessground.resize'));
|
||||
if ($(this).attr('href')) storage.remove();
|
||||
else storage.set(20);
|
||||
return true;
|
||||
}).end();
|
||||
$('body').prepend(pane);
|
||||
}
|
||||
};
|
||||
|
||||
lichess.userAutocomplete = function($input, opts) {
|
||||
opts = opts || {};
|
||||
lichess.loadCss('/assets/stylesheets/autocomplete.css');
|
||||
|
|
|
@ -34,7 +34,6 @@ interface Lichess {
|
|||
ab: any;
|
||||
challengeApp: any;
|
||||
hopscotch: any;
|
||||
openInMobileApp(gameId: string): void;
|
||||
makeChat(id: string, data: any, callback?: (chat: any) => void): void;
|
||||
topMenuIntent(): void;
|
||||
timeago: {
|
||||
|
|
Loading…
Reference in New Issue