Remove focus outlines around links only when they were focused with the mouse.

This commit is contained in:
ccd0 2015-03-02 20:47:50 -08:00
parent 220b5cbddd
commit 3e3aeffce1
2 changed files with 8 additions and 0 deletions

View File

@ -105,6 +105,11 @@ Main =
$.addClass doc, if chrome? then 'blink' else 'gecko'
$.addStyle Main.css, 'fourchanx-css'
mouse = false
$.on d, 'mousedown', -> mouse = true
$.on d, 'keydown', -> mouse = false
window.addEventListener 'focus', (-> doc.classList.toggle 'mouse-focus', mouse), true
Main.setClass()
setClass: ->

View File

@ -64,6 +64,9 @@ a[href="javascript:;"] {
body.hasDropDownNav{
margin-top: 5px;
}
:root.mouse-focus a {
outline: none;
}
.painted {
border-radius: 3px;
padding: 0px 2px;