zoom now works with Safari 10 - for #2282
This commit is contained in:
parent
cac65eb9c5
commit
b6c65586f4
|
@ -14,7 +14,7 @@
|
|||
<a class="d3 button" data-is3d="true">3D</a>
|
||||
</div>
|
||||
<input data-href="@routes.Pref.set("bgImg")" type="text" class="background_image" value="@ctx.bgImg" />
|
||||
@if(!lila.common.HTTPRequest.isTrident(ctx.req) && !lila.common.HTTPRequest.isSafari(ctx.req)) {
|
||||
@if(!lila.common.HTTPRequest.isTrident(ctx.req)) {
|
||||
<div class="zoom_control">
|
||||
<i data-icon="<"></i><div class="slider"></div>
|
||||
</div>
|
||||
|
|
|
@ -27,7 +27,6 @@ object HTTPRequest {
|
|||
private def uaContains(req: RequestHeader, str: String) = userAgent(req).exists(_ contains str)
|
||||
def isTrident(req: RequestHeader) = uaContains(req, "Trident/")
|
||||
def isChrome(req: RequestHeader) = uaContains(req, "Chrome/")
|
||||
def isSafari(req: RequestHeader) = uaContains(req, "Safari/") && !isChrome(req)
|
||||
|
||||
def origin(req: RequestHeader): Option[String] = req.headers get HeaderNames.ORIGIN
|
||||
|
||||
|
|
|
@ -599,7 +599,7 @@ lichess.notifyApp = (function() {
|
|||
|
||||
// Zoom
|
||||
var getZoom = function() {
|
||||
return (lichess.isTrident || lichess.isSafari) ? 1 : (lichess.storage.get('zoom') || 1);
|
||||
return lichess.isTrident ? 1 : (lichess.storage.get('zoom') || 1);
|
||||
};
|
||||
var setZoom = function(zoom) {
|
||||
lichess.storage.set('zoom', zoom);
|
||||
|
|
|
@ -194,7 +194,6 @@ lichess.widget = function(name, prototype) {
|
|||
};
|
||||
lichess.isTrident = navigator.userAgent.indexOf('Trident/') > -1;
|
||||
lichess.isChrome = navigator.userAgent.indexOf('Chrome/') > -1;
|
||||
lichess.isSafari = navigator.userAgent.indexOf('Safari/') > -1 && !lichess.isChrome;
|
||||
lichess.spinnerHtml = '<div class="spinner"><svg viewBox="0 0 40 40"><circle cx=20 cy=20 r=18 fill="none"></circle></svg></div>';
|
||||
lichess.assetConfig = {
|
||||
url: document.body.getAttribute('data-asset-url'),
|
||||
|
|
Loading…
Reference in a new issue