diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 290ca88a4..2072ce95c 100755 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -126,7 +126,7 @@ Main = $('link[href*=mobile]', d.head)?.disabled = true $.addClass doc, 'fourchan-x', 'seaweedchan' $.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' keyboard = false diff --git a/src/General/lib/$.coffee b/src/General/lib/$.coffee index 9545726bc..b8d34a44c 100755 --- a/src/General/lib/$.coffee +++ b/src/General/lib/$.coffee @@ -302,6 +302,11 @@ $.minmax = (value, min, max) -> $.hasAudio = (video) -> 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 = {} item[key] = val