Add 'webkit' CSS class to document when WebKit engine is detected.
This commit is contained in:
parent
87db92f55b
commit
f84f301336
@ -126,7 +126,7 @@ Main =
|
|||||||
$('link[href*=mobile]', d.head)?.disabled = true
|
$('link[href*=mobile]', d.head)?.disabled = true
|
||||||
$.addClass doc, 'fourchan-x', 'seaweedchan'
|
$.addClass doc, 'fourchan-x', 'seaweedchan'
|
||||||
$.addClass doc, if g.VIEW is 'thread' then 'thread-view' else g.VIEW
|
$.addClass doc, if g.VIEW is 'thread' then 'thread-view' else g.VIEW
|
||||||
$.addClass doc, if chrome? then 'blink' else 'gecko'
|
$.addClass doc, $.engine if $.engine
|
||||||
$.addStyle Main.css, 'fourchanx-css'
|
$.addStyle Main.css, 'fourchanx-css'
|
||||||
|
|
||||||
keyboard = false
|
keyboard = false
|
||||||
|
|||||||
@ -302,6 +302,11 @@ $.minmax = (value, min, max) ->
|
|||||||
$.hasAudio = (video) ->
|
$.hasAudio = (video) ->
|
||||||
video.mozHasAudio or !!video.webkitAudioDecodedByteCount
|
video.mozHasAudio or !!video.webkitAudioDecodedByteCount
|
||||||
|
|
||||||
|
$.engine = do ->
|
||||||
|
return 'blink' if /Chrome\//.test navigator.userAgent
|
||||||
|
return 'webkit' if /WebKit\//.test navigator.userAgent
|
||||||
|
return 'gecko' if /Gecko\/|Goanna/.test navigator.userAgent # Goanna = Pale Moon 26+
|
||||||
|
|
||||||
$.item = (key, val) ->
|
$.item = (key, val) ->
|
||||||
item = {}
|
item = {}
|
||||||
item[key] = val
|
item[key] = val
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user